aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2010-03-03 09:41:05 -0800
committerAdam Vandenberg2010-03-03 09:41:05 -0800
commit9f46adeeabf80664e87cb8810e7e0424b7911f89 (patch)
treef155e15bf6e88cc72612b2c86a2c9f3fcabe2a9a
parent5fc319236f9d9571e320158d7a18848d83583dec (diff)
downloadbrew-9f46adeeabf80664e87cb8810e7e0424b7911f89.tar.bz2
Move --cache command down near --prefix and use AGRV.formulae.
-rwxr-xr-xbin/brew17
1 files changed, 6 insertions, 11 deletions
diff --git a/bin/brew b/bin/brew
index d5d9791eb..cdb47911e 100755
--- a/bin/brew
+++ b/bin/brew
@@ -13,16 +13,6 @@ $:.unshift(HOMEBREW_LIBRARY_PATH)
require 'global'
case ARGV.first
-when '--cache'
- if ARGV.named.empty?
- puts HOMEBREW_CACHE
- else
- require 'formula'
- ARGV.named.each do |name|
- puts Formula.factory(name).cached_download rescue '(built from source control)'
- end
- end
- exit 0
when '-h', '--help', '--usage', '-?', 'help', nil
puts ARGV.usage
exit 0
@@ -80,13 +70,18 @@ begin
require 'brew.h'
case arg = ARGV.shift
+ when '--cache'
+ if ARGV.named.empty?
+ puts HOMEBREW_CACHE
+ else
+ puts *ARGV.formulae.collect {|f| f.cached_download rescue '(built from source control)'}
+ end
when '--prefix'
if ARGV.named.empty?
puts HOMEBREW_PREFIX
else
puts *ARGV.formulae.collect {|f| f.prefix}
end
-
when '--repository'
puts HOMEBREW_REPOSITORY
when '--cellar'