homebrew-core/Formula/hub.rb

35 lines
795 B
Ruby
Raw Normal View History

2009-12-11 16:13:57 +00:00
require 'formula'
2011-03-10 05:11:03 +00:00
class Hub < Formula
homepage 'http://hub.github.com/'
url 'https://github.com/github/hub/archive/v1.12.2.tar.gz'
sha1 '65359d3dcc8e1a0986aab3726f6047bfb9df3d7c'
head do
2014-12-03 22:44:40 +00:00
url "https://github.com/github/hub.git"
depends_on "go" => :build
end
option 'without-completions', 'Disable bash/zsh completions'
2009-12-11 16:13:57 +00:00
def install
if build.head?
system "script/build"
bin.install "hub"
else
rake "install", "prefix=#{prefix}"
end
if build.with? 'completions'
bash_completion.install 'etc/hub.bash_completion.sh'
zsh_completion.install 'etc/hub.zsh_completion' => '_hub'
end
end
test do
HOMEBREW_REPOSITORY.cd do
2014-05-04 19:12:41 +00:00
assert_equal "bin/brew", shell_output("#{bin}/hub ls-files -- bin").strip
end
end
2009-12-11 16:13:57 +00:00
end