bf8f4e4c0f
The man page for this is really essential. If the user choose not to build the man page, simply copy the original `asciidoc` file to #{doc}. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
32 lines
718 B
Ruby
32 lines
718 B
Ruby
require 'formula'
|
|
|
|
class GitSubtree <Formula
|
|
homepage 'http://github.com/apenwarr/git-subtree'
|
|
head 'git://github.com/apenwarr/git-subtree.git',
|
|
:tag => 'v0.3'
|
|
|
|
def options
|
|
[
|
|
['--build-docs', "Build man pages using asciidoc and xmlto"]
|
|
]
|
|
end
|
|
|
|
if ARGV.include? '--build-docs'
|
|
# these are needed to build man pages
|
|
depends_on 'asciidoc'
|
|
depends_on 'xmlto'
|
|
end
|
|
|
|
# Not depending on git because people might have it
|
|
# installed through another means
|
|
|
|
def install
|
|
if ARGV.include? '--build-docs'
|
|
system "make doc"
|
|
man1.install "git-subtree.1"
|
|
else
|
|
doc.install "git-subtree.txt"
|
|
end
|
|
bin.install "git-subtree.sh" => "git-subtree"
|
|
end
|
|
end
|