2010-08-15 15:11:09 -07:00
|
|
|
require "formula"
|
2010-09-11 20:22:54 +01:00
|
|
|
require "cmd/outdated"
|
2010-08-15 15:11:09 -07:00
|
|
|
|
|
|
|
def main
|
|
|
|
# Names of outdated brews; they count as installed.
|
2010-09-11 20:22:54 +01:00
|
|
|
outdated = Homebrew.outdated_brews.collect{ |b| b[1] }
|
2010-08-15 15:11:09 -07:00
|
|
|
|
2010-09-11 20:22:54 +01:00
|
|
|
HOMEBREW_CELLAR.subdirs.each do |rack|
|
|
|
|
f = Formula.factory rack.basename.to_s rescue nil
|
|
|
|
if f and f.installed?
|
|
|
|
missing_deps = f.recursive_deps.map{ |g| g.name }.uniq.reject do |dep_name|
|
2010-08-15 15:23:43 -07:00
|
|
|
Formula.factory(dep_name).installed? or outdated.include?(dep_name)
|
2010-08-15 15:11:09 -07:00
|
|
|
end
|
|
|
|
|
2010-09-11 20:22:54 +01:00
|
|
|
puts "#{f.name}: #{missing_deps * ', '}" unless missing_deps.empty?
|
2010-08-15 15:11:09 -07:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
main()
|