2010-08-15 15:11:09 -07:00
|
|
|
require "formula"
|
|
|
|
require 'formula_installer'
|
|
|
|
|
|
|
|
def main
|
|
|
|
# Names of outdated brews; they count as installed.
|
2010-10-01 07:12:21 -07:00
|
|
|
outdated = outdated_brews.collect {|b| b[1]}
|
2010-08-15 15:11:09 -07:00
|
|
|
|
|
|
|
HOMEBREW_CELLAR.subdirs.each do |keg|
|
|
|
|
next unless keg.subdirs
|
|
|
|
if ((f = Formula.factory(keg.basename.to_s)).installed? rescue false)
|
|
|
|
f_deps = FormulaInstaller.expand_deps(f).collect{|g| g.name}.uniq
|
|
|
|
next if f_deps.empty?
|
|
|
|
|
2010-08-15 15:23:43 -07:00
|
|
|
missing_deps = f_deps.reject do |dep_name|
|
|
|
|
Formula.factory(dep_name).installed? or outdated.include?(dep_name)
|
2010-08-15 15:11:09 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
puts "#{f.name}: #{missing_deps.join(', ')}" unless missing_deps.empty?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
main()
|