Add name to brew info url and remove external script

This commit is contained in:
Adam Vandenberg 2010-07-29 08:40:22 -07:00
parent fa4671f59f
commit 2e881238de
2 changed files with 8 additions and 8 deletions

View File

@ -1,7 +0,0 @@
#!/usr/bin/ruby
$:.push(File.expand_path(__FILE__+'/../..'))
require 'extend/pathname'
p = Pathname.new(ARGV[0])
v = p.version
puts v

View File

@ -241,7 +241,14 @@ begin
puts `ls #{HOMEBREW_CELLAR} | wc -l`.strip+" kegs, "+HOMEBREW_CELLAR.abv
end
elsif ARGV[0][0..6] == 'http://'
puts Pathname.new(ARGV.shift).version
path = Pathname.new(ARGV.shift)
/(.*?)[-_.]?#{path.version}/.match path.basename
unless $1.to_s.empty?
name = $1
else
name = path.stem
end
puts "#{name} #{path.version}"
else
ARGV.formulae.each{ |f| info f }
end