aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
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