brew info should fetch remote formula info

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Joshua Peek 2011-03-14 10:55:15 -05:00 committed by Adam Vandenberg
parent b02d25bccd
commit 80886ff34a

View File

@ -12,14 +12,7 @@ module Homebrew extend self
puts "#{HOMEBREW_CELLAR.children.length} kegs, #{HOMEBREW_CELLAR.abv}" puts "#{HOMEBREW_CELLAR.children.length} kegs, #{HOMEBREW_CELLAR.abv}"
end end
elsif valid_url ARGV[0] elsif valid_url ARGV[0]
path = Pathname.new(ARGV.shift) info_formula Formula.factory(ARGV.shift)
/(.*?)[-_.]?#{path.version}/.match path.basename
unless $1.to_s.empty?
name = $1
else
name = path.stem
end
puts "#{name} #{path.version}"
else else
ARGV.formulae.each{ |f| info_formula f } ARGV.formulae.each{ |f| info_formula f }
end end