mirror of
https://github.com/golang/go
synced 2024-11-19 07:44:49 -07:00
8c1a5674dd
Updates for the hg->git move. Change-Id: I4c1b91ada1b90090db958554c92d06fb1d36ec35 Reviewed-on: https://go-review.googlesource.com/1364 Reviewed-by: Andrew Gerrand <adg@golang.org>
21 lines
692 B
Bash
Executable File
21 lines
692 B
Bash
Executable File
set -ex
|
|
|
|
export GOPATH=/gopath
|
|
export GOROOT=/goroot
|
|
PREFIX=/usr/local
|
|
: ${GO_REV:?"need to be set to the golang repo revision used to build the commit watcher."}
|
|
: ${WATCHER_REV:?"need to be set to the go.tools repo revision for the commit watcher."}
|
|
|
|
mkdir -p $GOROOT
|
|
git clone https://go.googlesource.com/go $GOROOT
|
|
(cd $GOROOT/src && git reset --hard $GO_REV && find && ./make.bash)
|
|
|
|
GO_TOOLS=$GOPATH/src/golang.org/x/tools
|
|
mkdir -p $GO_TOOLS
|
|
git clone https://go.googlesource.com/tools $GO_TOOLS
|
|
|
|
mkdir -p $PREFIX/bin
|
|
(cd $GO_TOOLS && git reset --hard $WATCHER_REV && GOBIN=$PREFIX/bin /goroot/bin/go install golang.org/x/tools/dashboard/watcher)
|
|
|
|
rm -fR $GOROOT/bin $GOROOT/pkg $GOPATH
|