From 86f21985e67c947dbabac1c71ba90c96dfd04582 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Tue, 6 Aug 2013 21:59:37 -0700 Subject: git: use resources --- Library/Formula/git.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'Library') diff --git a/Library/Formula/git.rb b/Library/Formula/git.rb index 750066af1..8f5535f42 100644 --- a/Library/Formula/git.rb +++ b/Library/Formula/git.rb @@ -1,15 +1,5 @@ require 'formula' -class GitManuals < Formula - url 'http://git-core.googlecode.com/files/git-manpages-1.8.4.tar.gz' - sha1 '8c67a7bc442d6191bc17633c7f2846c71bda71cf' -end - -class GitHtmldocs < Formula - url 'http://git-core.googlecode.com/files/git-htmldocs-1.8.4.tar.gz' - sha1 'f130398eb623c913497ef51a6e61d916fe7e31c8' -end - class Git < Formula homepage 'http://git-scm.com' url 'http://git-core.googlecode.com/files/git-1.8.4.tar.gz' @@ -24,6 +14,16 @@ class Git < Formula depends_on 'pcre' => :optional depends_on 'gettext' => :optional + resource 'man' do + url 'http://git-core.googlecode.com/files/git-manpages-1.8.4.tar.gz' + sha1 '8c67a7bc442d6191bc17633c7f2846c71bda71cf' + end + + resource 'html' do + url 'http://git-core.googlecode.com/files/git-htmldocs-1.8.4.tar.gz' + sha1 'f130398eb623c913497ef51a6e61d916fe7e31c8' + end + def install # If these things are installed, tell Git build system to not use them ENV['NO_FINK'] = '1' @@ -83,8 +83,8 @@ class Git < Formula # We could build the manpages ourselves, but the build process depends # on many other packages, and is somewhat crazy, this way is easier. - GitManuals.new.brew { man.install Dir['*'] } - GitHtmldocs.new.brew { (share+'doc/git-doc').install Dir['*'] } + man.install resource('man') + (share+'doc/git-doc').install resource('html') end def caveats; <<-EOS.undent -- cgit v1.2.3