Created
October 31, 2014 16:41
-
-
Save jasonmoo/f864f306b327f0c67406 to your computer and use it in GitHub Desktop.
update local go and toolchain for linux to any tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
VERSION=${1:-release} | |
GOROOT=${GOROOT:-/usr/local/go} | |
if [ ! -d $GOROOT ]; then | |
hg clone https://code.google.com/p/go $GOROOT | |
fi | |
pushd $GOROOT | |
hg pull | |
rm -rf * | |
hg up --clean $VERSION | |
cd src | |
GOOS=darwin GOARCH=amd64 ./all.bash | |
GOOS=linux GOARCH=amd64 ./make.bash | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment