aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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`