Skip to content

Instantly share code, notes, and snippets.

@jasonmoo
Created October 31, 2014 16:41
Show Gist options
  • Save jasonmoo/f864f306b327f0c67406 to your computer and use it in GitHub Desktop.
Save jasonmoo/f864f306b327f0c67406 to your computer and use it in GitHub Desktop.
update local go and toolchain for linux to any tag
#!/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