aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMax Howell2009-06-05 12:57:00 +0100
committerMax Howell2009-06-05 12:57:00 +0100
commitdac062e05369b31771aa855f3d5b7cea86eb8b64 (patch)
treea134e00dedd84808d82551cb106a07c97f229af0 /bin
parent5954dc014dd28281c2b4dbdda143e419a3859705 (diff)
downloadhomebrew-dac062e05369b31771aa855f3d5b7cea86eb8b64.tar.bz2
Handle -- args properly
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew13
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/brew b/bin/brew
index f3213b33d..2614d2bcf 100755
--- a/bin/brew
+++ b/bin/brew
@@ -50,8 +50,13 @@ end
def shift_formulae_from_ARGV
fae=Array.new
- while name=ARGV[0]
- fae<<formulize(ARGV.shift).to_s unless name[0] == '-'
+ i=0
+ while name=ARGV[i]
+ unless name[0,1] == '-'
+ fae<<formulize(ARGV.shift).to_s
+ else
+ i+=1
+ end
end
raise "You must specify a formula" if fae.empty?
return fae
@@ -235,6 +240,10 @@ begin
o=__obj shift_formulae_from_ARGV[0]
puts "#{o.name} #{o.version}"
puts o.homepage
+ if o.caveats
+ ohai 'Caveats'
+ puts o.caveats
+ end
else
puts usage
end