aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Contributions/examples/brew-missing.rb
diff options
context:
space:
mode:
authorMike McQuaid2012-03-18 15:33:21 +1300
committerMike McQuaid2012-03-18 15:34:41 +1300
commite33937a1e35e75dffae043f22e975bfd51dea409 (patch)
tree0c04edf7d597577808d5dc72a68718e047052168 /Library/Contributions/examples/brew-missing.rb
parentd47cf55f68fb1d381cfbdc9de905dc33c7ce5a83 (diff)
downloadbrew-e33937a1e35e75dffae043f22e975bfd51dea409.tar.bz2
Rename external commands directory from examples.
Fixes Homebrew/homebrew#10829.
Diffstat (limited to 'Library/Contributions/examples/brew-missing.rb')
-rwxr-xr-xLibrary/Contributions/examples/brew-missing.rb37
1 files changed, 0 insertions, 37 deletions
diff --git a/Library/Contributions/examples/brew-missing.rb b/Library/Contributions/examples/brew-missing.rb
deleted file mode 100755
index 50fae12e4..000000000
--- a/Library/Contributions/examples/brew-missing.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-require "formula"
-require "cmd/outdated"
-
-def installed_brews
- formulae = []
- HOMEBREW_CELLAR.subdirs.each do |rack|
- f = Formula.factory rack.basename.to_s rescue nil
- formulae << f if f and f.installed?
- end
- formulae
-end
-
-def main
- return unless HOMEBREW_CELLAR.exist?
-
- # Names of outdated brews; they count as installed.
- outdated = Homebrew.outdated_brews.collect{ |b| b.name }
-
- formulae_to_check = if ARGV.named.empty?
- installed_brews
- else
- ARGV.formulae
- end
-
- formulae_to_check.each do |f|
- missing_deps = f.recursive_deps.map{ |g| g.name }.uniq.reject do |dep_name|
- Formula.factory(dep_name).installed? or outdated.include?(dep_name)
- end
-
- unless missing_deps.empty?
- print "#{f.name}: " if formulae_to_check.size > 1
- puts "#{missing_deps * ' '}"
- end
- end
-end
-
-main()