diff options
| author | Max Howell | 2009-09-10 14:11:04 +0100 |
|---|---|---|
| committer | Max Howell | 2009-09-10 19:23:03 +0100 |
| commit | fdaa267fb92e1652865083e1be11db06e8c94361 (patch) | |
| tree | 13152933d452d9ff9c3121a3921fab99793af1a0 /bin | |
| parent | 0a31190fdca5fd8619263e66212d74d4c2f56a74 (diff) | |
| download | brew-fdaa267fb92e1652865083e1be11db06e8c94361.tar.bz2 | |
Don't install dependencies that are already installed
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/brew | 31 |
1 files changed, 18 insertions, 13 deletions
@@ -91,23 +91,28 @@ begin end end - unless system "which #{ENV['CC'] or 'cc'} &> /dev/null" and $?.success? - raise "We cannot find a c compiler, have you installed the latest Xcode?" - end - - fae = ARGV.formulae.reject do |f| - if f.installed? and not ARGV.force? - message = "Formula already installed: #{f.prefix}" - if ARGV.formulae.count > 1 - opoo message - else - puts message # if only one is being installed a warning looks severe + unless ARGV.force? + unless system "which #{ENV['CC'] or 'cc'} &> /dev/null" and $?.success? + raise "We cannot find a c compiler, have you installed the latest Xcode?" + end + fae = ARGV.formulae.reject do |f| + if f.installed? + message = "Formula already installed: #{f.prefix}" + if ARGV.formulae.count > 1 + opoo message + else + puts message # if only one is being installed a warning looks severe + end + true end - true end + exit 0 if fae.empty? + else + fae=ARGV.formulae end - fae=expand_deps ARGV.formulae + # the resulting order will be optimal for super-deps and deps + fae=expand_deps fae require 'beer_events' |
