aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-06-08 11:13:22 -0700
committerAdam Vandenberg2010-06-16 09:52:20 -0700
commit69b99011318786c47ecf00d929269c80886cd570 (patch)
tree2c08dfda06151ab2d1c1b5d55d4cce00fd41b470 /Library
parent77ae1821b5498a419ac2307c8556118b96c69b28 (diff)
downloadbrew-69b99011318786c47ecf00d929269c80886cd570.tar.bz2
Move code to find outdated brew list
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew.h.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb
index b05ce2ed2..3c82bf25a 100644
--- a/Library/Homebrew/brew.h.rb
+++ b/Library/Homebrew/brew.h.rb
@@ -385,6 +385,20 @@ def versions_of(keg_name)
end
+def outdated_brews
+ require 'formula'
+
+ results = []
+ HOMEBREW_CELLAR.subdirs.each do |keg|
+ next unless keg.subdirs
+ name = keg.basename.to_s
+ if (not (f = Formula.factory(name)).installed? rescue nil)
+ results << [keg, name, f.version]
+ end
+ end
+ return results
+end
+
########################################################## class PrettyListing
class PrettyListing
def initialize path