From 97309e91d29c2dd1b817b361a4b4db62fa4f92cc Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Fri, 27 May 2011 10:02:11 -0700 Subject: [PATCH] erlang: add --no-docs option --- Formula/erlang.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Formula/erlang.rb b/Formula/erlang.rb index 8537272bdd..be699746ed 100644 --- a/Formula/erlang.rb +++ b/Formula/erlang.rb @@ -38,7 +38,8 @@ class Erlang < Formula def options [ ['--disable-hipe', "Disable building hipe; fails on various OS X systems."], - ['--time', '"brew test --time" to include a time-consuming test.'] + ['--time', '"brew test --time" to include a time-consuming test.'], + ['--no-docs', 'Do not install documentation.'] ] end @@ -71,11 +72,13 @@ class Erlang < Formula system "make" system "make install" - manuals = ARGV.build_head? ? ErlangHeadManuals : ErlangManuals - manuals.new.brew { man.install Dir['man/*'] } + unless ARGV.include? '--no-docs' + manuals = ARGV.build_head? ? ErlangHeadManuals : ErlangManuals + manuals.new.brew { man.install Dir['man/*'] } - htmls = ARGV.build_head? ? ErlangHeadHtmls : ErlangHtmls - htmls.new.brew { doc.install Dir['*'] } + htmls = ARGV.build_head? ? ErlangHeadHtmls : ErlangHtmls + htmls.new.brew { doc.install Dir['*'] } + end end def test