Last active
July 26, 2017 21:03
-
-
Save tydavis/23ee440373016068f68aa1beea2e681e to your computer and use it in GitHub Desktop.
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 | |
mkdir -p ~/go/{src,bin,pkg} | |
mkdir -p ~/go/src/github.com/tydavis | |
mkdir -p ~/go/src/gitlab.com/tydavis | |
# Get latest go | |
sudo rm -rf /usr/local/go | |
wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz | |
sudo tar -C /usr/local/ -xzf go1.8.3.linux-amd64.tar.gz | |
rm go1.8.3.linux-amd64.tar.gz | |
# Add path info | |
export GOROOT=/usr/local/go | |
export GOPATH=~/go | |
export PATH=$PATH:/usr/local/go/bin:~/go/bin | |
cat "export GOROOT=/usr/local/go" >> ~/.bashrc | |
cat "export GOPATH=~/go" >> ~/.bashrc | |
cat "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bashrc | |
source ~/.bashrc | |
# Get all Go tools (based on vim-go) | |
wget -q -O - https://gist.githubusercontent.com/tydavis/0ee20d28d7e44c57186e0a7ac0db91c4/raw/14f640eb05a9085332ec5983b2f80698bbc0ae6d/getGoTools.sh | bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment