Last active
August 29, 2015 14:04
-
-
Save jasonwbarnett/8f7422c2662b07dd3316 to your computer and use it in GitHub Desktop.
How to install Go in a few seconds
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 | |
wget "http://golang.org/dl/go1.3.linux-amd64.tar.gz" -O ~/go1.3.linux-amd64.tar.gz | |
tar -C /usr/local -xzf ~/go1.3.linux-amd64.tar.gz | |
cat << 'EOF' | sudo tee -a /etc/profile | |
export GOROOT=/usr/local/go | |
export PATH=$PATH:/usr/local/go/bin | |
EOF | |
mkdir ~/go/{,pkg,src,bin} | |
cat >> ~/.bashrc << 'EOF' | |
export GOPATH=$HOME/go | |
export PATH=$GOPATH/bin:$PATH | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment