Last active
August 29, 2015 14:22
-
-
Save josh-padnick/944db615bdfaca7112c2 to your computer and use it in GitHub Desktop.
Install Latest Golang
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/bash | |
# Install goxc | |
go get github.com/laher/goxc | |
# May need to do these commands... | |
goxc -t | |
# Build the binaries | |
`GOOS=darwin GOARCH=386 go build -o /home/ubuntu/builds/ec2-snapper/0.1.0/darwin_386/ec2-snapper` | |
`GOOS=darwin GOARCH=amd64 go build -o /home/ubuntu/builds/ec2-snapper/0.1.0/darwin_amd64/ec2-snapper` | |
`GOOS=linux GOARCH=386 go build -o /home/ubuntu/builds/ec2-snapper/0.1.0/linux_386/ec2-snapper` | |
`GOOS=linux GOARCH=amd64 go build -o /home/ubuntu/builds/ec2-snapper/0.1.0/linux_amd64/ec2-snapper` | |
`GOOS=windows GOARCH=386 go build -o /home/ubuntu/builds/ec2-snapper/0.1.0/windows_386/ec2-snapper.exe` | |
`GOOS=windows GOARCH=amd64 go build -o /home/ubuntu/builds/ec2-snapper/0.1.0/windows_amd64/ec2-snapper.exe` | |
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/bash | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get -y install gcc | |
sudo apt-get -y install git | |
git clone https://go.googlesource.com/go | |
mv go goroot | |
cd goroot | |
git checkout go1.4.2 | |
cd src | |
./all.bash | |
mkdir /home/ubuntu/go | |
mkdir /home/ubuntu/goroot | |
# Add this to /home/ubuntu/.bash_profile | |
export GOPATH=/home/ubuntu/go | |
export PATH=/home/ubuntu/goroot/bin:$PATH | |
export PATH=$GOPATH/bin:$PATH | |
# Install dependencies | |
go get golang.org/x/tools/cmd/vet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment