Last active
May 21, 2018 16:59
-
-
Save mlocher/f9f69d83a850ff7da161 to your computer and use it in GitHub Desktop.
Install GOX (go cross compiler)
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/sh | |
set -e | |
NEW_GOROOT="${HOME}/go" | |
OSARCH="linux/amd64 windows/amd64" | |
mkdir -p "${NEW_GOROOT}" | |
cp -r "${GOROOT}" "${HOME}" | |
export GOROOT="${NEW_GOROOT}" | |
export PATH="${GOROOT}/bin:${PATH}" | |
go get github.com/mitchellh/gox | |
gox -build-toolchain -osarch="${OSARCH}" | |
gox ./... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment