Last active
December 12, 2015 02:58
-
-
Save gebi/4702669 to your computer and use it in GitHub Desktop.
go cross compile/update helper script
This file contains hidden or 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 | |
cd /opt/go/src/ | |
echo "### UPDATING SOURCE" | |
hg pull | |
hg update -C release | |
echo "### BUILDING NATIVE TOOLCHAIN" | |
CGO_ENABLE=1 ./all.bash | |
echo "### BUILDING TOOLCHAIN: linux/i386" | |
GOOS=linux GOARCH=386 CGO_ENABLED=0 ./make.bash --no-clean | |
echo "### BUILDING TOOLCHAIN: linux/arm" | |
GOOS=linux GOARCH=arm CGO_ENABLED=0 ./make.bash --no-clean | |
echo "### BUILDING TOOLCHAIN: windows/amd64" | |
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 ./make.bash --no-clean | |
echo "### BUILDING TOOLCHAIN: windows/i386" | |
GOOS=windows GOARCH=386 CGO_ENABLED=0 ./make.bash --no-clean | |
echo "### UPDATING TIMESTAMPS (GO FIXES)" | |
find /opt/go/pkg/ -print0 |xargs -0r touch | |
go install std | |
cd ~ | |
export GOPATH=~/go | |
go get code.google.com/p/go.tools/cmd/... | |
echo "### SUCCESS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment