Append all arguments to brew install option

So forumla scripts get ARGV[2..] as their arguments when brew install x
is invoked
This commit is contained in:
Max Howell 2009-05-21 17:52:18 +01:00
parent 0b0fa48c31
commit 9554f771cc

View File

@ -7,9 +7,11 @@ $root = Pathname.new(__FILE__).realpath.dirname.parent.parent
case ARGV[0] case ARGV[0]
when 'brew', 'install' then when 'brew', 'install' then
file="#{$root}/Formula/#{ARGV[1]}" abort "You must specify a Formula" unless ARGV[1]
ARGV.shift
file="#{$root}/Formula/#{ARGV.shift}"
file+='.rb' unless File.exist? file file+='.rb' unless File.exist? file
system "ruby #{file}" system "ruby #{file} #{ARGV.join ' '}"
when 'ln' then when 'ln' then
abort "#{ARGV[1]} is not a directory" unless File.directory? ARGV[1] abort "#{ARGV[1]} is not a directory" unless File.directory? ARGV[1]