Add name to brew info url and remove external script
This commit is contained in:
parent
fa4671f59f
commit
2e881238de
@ -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
|
|
||||||
9
bin/brew
9
bin/brew
@ -241,7 +241,14 @@ begin
|
|||||||
puts `ls #{HOMEBREW_CELLAR} | wc -l`.strip+" kegs, "+HOMEBREW_CELLAR.abv
|
puts `ls #{HOMEBREW_CELLAR} | wc -l`.strip+" kegs, "+HOMEBREW_CELLAR.abv
|
||||||
end
|
end
|
||||||
elsif ARGV[0][0..6] == 'http://'
|
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
|
else
|
||||||
ARGV.formulae.each{ |f| info f }
|
ARGV.formulae.each{ |f| info f }
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user