brew outdated

brew install `brew outdated` will work

Apologies that this is long overdue.

Fixes Homebrew/homebrew#838
This commit is contained in:
Max Howell 2010-02-27 13:29:49 +00:00
parent 991bae91a9
commit 74c44a20e0

View File

@ -336,6 +336,22 @@ begin
Dir.chdir HOMEBREW_REPOSITORY Dir.chdir HOMEBREW_REPOSITORY
exec "cat", ARGV.formulae.first.path, *ARGV.options exec "cat", ARGV.formulae.first.path, *ARGV.options
when 'outdated'
require 'formula'
HOMEBREW_CELLAR.children.each do |keg|
if keg.subdirs.length > 0
name = keg.basename('.rb').to_s
if (not (f = Formula.factory(name)).installed? rescue nil)
if $stdout.tty? and not ARGV.flag? '--quiet'
versions = keg.cd{ Dir['*'] }.join(', ')
puts "#{name} (#{versions} < #{f.version})"
else
puts name
end
end
end
end
else else
onoe "Unknown command: #{arg}" onoe "Unknown command: #{arg}"
end end