Skip to content

Instantly share code, notes, and snippets.

@jahfer
Created May 11, 2013 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jahfer/5560980 to your computer and use it in GitHub Desktop.
Save jahfer/5560980 to your computer and use it in GitHub Desktop.
goxc() {
echo "+-BUILD START-----------------------------------------------------------------+"
echo "Building Linux binary..."
GOOS=linux GOARCH=386 CGO_ENABLED=0 go build -o $1.linux $1.go
echo "Building OS X binary..."
go build $1.go
echo "Building Windows binary..."
GOOS=windows GOARCH=386 go build -o $1.exe $1.go
echo "+-BUILD COMPLETE--------------------------------------------------------------+"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment