aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-07-28 00:33:08 +0100
committerMax Howell2009-07-28 00:33:08 +0100
commit3c5760508251c382cde48cdb6be0669c0acd9ad8 (patch)
tree133df201152cdadec745a12fe5eda5efa0541ece
parent29c5993ff8e8bda38b694eb95712de6f8890e628 (diff)
downloadhomebrew-3c5760508251c382cde48cdb6be0669c0acd9ad8.tar.bz2
brew info lists number of kegs
-rwxr-xr-xbin/brew6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/brew b/bin/brew
index d40296768..23a938123 100755
--- a/bin/brew
+++ b/bin/brew
@@ -1,5 +1,4 @@
#!/usr/bin/ruby
-
require 'find'
require 'pathname'
$:.unshift Pathname.new(__FILE__).dirname.parent.realpath+'Library'+'Homebrew'
@@ -15,7 +14,7 @@ def prune
$root.find do |path|
if path.directory?
name=path.relative_path_from($root).to_s
- if name == '.git' or name == 'Cellar' or name == 'Library/Homebrew' or name == 'Library/Formula'
+ if name == '.git' or name == 'Cellar' or name == 'Library'
Find.prune
else
dirs<<path
@@ -28,7 +27,6 @@ def prune
end
end
end
- # entries lists '.' and '..' so 2 is minimum basically
dirs.sort.reverse_each do |d|
if d.children.length == 0
d.rmdir
@@ -232,7 +230,7 @@ begin
when 'info', 'abv'
if ARGV.empty?
- puts abv
+ puts `ls #{$cellar} | wc -l`.strip+" kegs, "+abv
elsif ARGV[0][0..6] == 'http://'
puts Pathname.new(ARGV.shift).version
else