Skip to content

Instantly share code, notes, and snippets.

@mlocher
Last active May 21, 2018 16:59
Show Gist options
  • Save mlocher/f9f69d83a850ff7da161 to your computer and use it in GitHub Desktop.
Save mlocher/f9f69d83a850ff7da161 to your computer and use it in GitHub Desktop.
Install GOX (go cross compiler)
#!/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