aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrew Hess2010-10-22 16:22:16 -0700
committerAdam Vandenberg2010-10-23 11:24:31 -0700
commit169f54c5d3c244f1f21897729b6a70c0db7bdcc7 (patch)
treed9da809155407051d23ee08b6875050a6bcd8b4f
parent60954f786d65ca2ac92001d4177fd6175700b726 (diff)
downloadhomebrew-169f54c5d3c244f1f21897729b6a70c0db7bdcc7.tar.bz2
go: added --use-git-head option to formula.
Uses http://github.com/tav/go.git git mirror of official Mercurial repository to obviate the need for installing Mercurial. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/go.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/Library/Formula/go.rb b/Library/Formula/go.rb
index 361e7d28b..c7bfdfcd3 100644
--- a/Library/Formula/go.rb
+++ b/Library/Formula/go.rb
@@ -2,9 +2,19 @@ require 'formula'
require 'hardware'
class Go <Formula
- head 'http://go.googlecode.com/hg/', :revision => 'release'
+ if ARGV.include? "--use-git-head"
+ head 'http://github.com/tav/go.git', :revision => 'release'
+ else
+ head 'http://go.googlecode.com/hg/', :revision => 'release'
+ end
homepage 'http://golang.org'
+ def options
+ [
+ ["--use-git-head", "Use git mirror instead of official hg repository"],
+ ]
+ end
+
skip_clean 'bin'
def which_arch
@@ -35,6 +45,10 @@ class Go <Formula
def caveats
<<-EOS.undent
+ The official Go code repository uses mercurial, but a reasonably
+ up-to-date git mirror is available at http://github.com/tav/go.git.
+ To use the git mirror for Go builds, use the --use-git-head option.
+
In order to use Go, set the following in your ~/.profile:
export GOROOT=`brew --cellar go`