2010-05-07 00:44:58 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class GitSubtree < Formula
|
2010-11-10 18:16:28 +00:00
|
|
|
homepage 'https://github.com/apenwarr/git-subtree'
|
2011-02-26 17:31:15 +00:00
|
|
|
url 'https://github.com/apenwarr/git-subtree/zipball/v0.4'
|
|
|
|
md5 '904f325d2208ad5ca542e7bb56c50f9c'
|
|
|
|
|
2011-05-27 05:02:55 +00:00
|
|
|
head 'https://github.com/apenwarr/git-subtree.git'
|
2010-09-24 19:08:41 +00:00
|
|
|
|
|
|
|
def options
|
2011-02-26 17:31:15 +00:00
|
|
|
[['--build-docs', "Build man pages using asciidoc and xmlto"]]
|
2010-09-24 19:08:41 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
if ARGV.include? '--build-docs'
|
|
|
|
# these are needed to build man pages
|
|
|
|
depends_on 'asciidoc'
|
|
|
|
depends_on 'xmlto'
|
|
|
|
end
|
2010-05-07 00:44:58 +00:00
|
|
|
|
|
|
|
def install
|
2010-09-24 19:08:41 +00:00
|
|
|
if ARGV.include? '--build-docs'
|
|
|
|
system "make doc"
|
|
|
|
man1.install "git-subtree.1"
|
|
|
|
else
|
|
|
|
doc.install "git-subtree.txt"
|
|
|
|
end
|
2010-05-07 00:44:58 +00:00
|
|
|
bin.install "git-subtree.sh" => "git-subtree"
|
|
|
|
end
|
|
|
|
end
|