[GBM] Generate a tmp file with headers instead of passing all as arguments.

Fixes http://hipbyte.myjetbrains.com/youtrack/issue/RM-581.
This commit is contained in:
Eloy Durán
2014-09-02 16:34:03 +02:00
parent 49b6607659
commit 63926a22c6
3 changed files with 22 additions and 1 deletions

View File

@@ -91,6 +91,16 @@ if __FILE__ == $0
g.out_file = opt
end
# RubyMotion addition that allows us to overcome 'too many arguments' error
# when passing many headers to this tool.
opts.on('--headers FILE', 'Use headers listed in file as input.') do |file|
File.open(file, 'r') do |io|
io.each_line do |header|
g.add_header(header.strip)
end
end
end
help_msg = "Use the `-h' flag or consult gen_bridge_metadata(1) for help."
opts.on('-h', '--help', 'Show this message.') do
puts opts, help_msg