aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianyi Cui2010-09-25 03:08:41 +0800
committerAdam Vandenberg2010-09-25 09:22:44 -0700
commit366d3cc7c094206de2fb07af01a41f6ce12762e5 (patch)
tree11b45f1ab3749aeed3bfb2fe089d2b25240034be
parentb9c37d0aba81dd7b73a3092a648d4445573d655a (diff)
downloadhomebrew-366d3cc7c094206de2fb07af01a41f6ce12762e5.tar.bz2
git-subtree: add `--build-docs` option
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>
-rw-r--r--Library/Formula/git-subtree.rb20
1 files changed, 19 insertions, 1 deletions
diff --git a/Library/Formula/git-subtree.rb b/Library/Formula/git-subtree.rb
index ded95a4a4..b427ff42a 100644
--- a/Library/Formula/git-subtree.rb
+++ b/Library/Formula/git-subtree.rb
@@ -3,12 +3,30 @@ require 'formula'
class GitSubtree <Formula
homepage 'http://github.com/apenwarr/git-subtree'
head 'git://github.com/apenwarr/git-subtree.git',
- :tag => 'c00d1d11688dc02f066196ed18783effdb7767ab'
+ :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