2009-12-11 16:13:57 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Hub < Formula
|
2012-03-20 22:51:50 +00:00
|
|
|
homepage 'http://defunkt.io/hub/'
|
2012-12-29 15:40:09 +00:00
|
|
|
url 'https://github.com/defunkt/hub/tarball/v1.10.4'
|
|
|
|
sha1 'b43f69f20563cb779d77a6beaf773bad8c49ad4c'
|
2009-12-11 16:13:57 +00:00
|
|
|
|
2012-11-22 18:58:28 +00:00
|
|
|
head 'https://github.com/defunkt/hub.git'
|
|
|
|
|
2009-12-11 16:13:57 +00:00
|
|
|
def install
|
2012-07-06 08:37:57 +00:00
|
|
|
system rake_bin, "install", "prefix=#{prefix}"
|
2012-03-20 22:51:50 +00:00
|
|
|
(prefix+'etc/bash_completion.d').install 'etc/hub.bash_completion.sh'
|
2012-04-29 06:55:56 +00:00
|
|
|
(share+'zsh/site-functions').install 'etc/hub.zsh_completion' => '_hub'
|
2012-03-20 22:51:50 +00:00
|
|
|
end
|
|
|
|
|
2012-07-06 08:37:57 +00:00
|
|
|
def rake_bin
|
|
|
|
require 'rbconfig'
|
|
|
|
ruby_rake = File.join RbConfig::CONFIG['bindir'], 'rake'
|
|
|
|
|
|
|
|
if File.exist? ruby_rake
|
|
|
|
ruby_rake
|
|
|
|
else
|
|
|
|
'/usr/bin/rake'
|
|
|
|
end
|
|
|
|
end
|
2009-12-11 16:13:57 +00:00
|
|
|
end
|