Skip to content
Browse files

Move --cache command down near --prefix and use AGRV.formulae.

  • Loading branch information...
1 parent b063279 commit d55635ae9639671c370aaffeb68d75c035fc1e81 @adamv adamv committed Mar 3, 2010
Showing with 6 additions and 11 deletions.
  1. +6 −11 bin/brew
View
17 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'

0 comments on commit d55635a

Please sign in to comment.
Something went wrong with that request. Please try again.