Created
May 14, 2018 17:05
-
-
Save tphdev/fc1d1b70ffd3bd7369fc30f80c89eb36 to your computer and use it in GitHub Desktop.
install-go.sh
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 ~/__tempdldir/ | |
cd ~/__tempdldir | |
# + (i) download + unzip Go-language @ https://golang.org/doc/install?download=go1.9.linux-amd64.tar.gz | |
curl https://dl.google.com/go/go1.10.2.linux-amd64.tar.gz > go1.10.2.linux-amd64.tar.gz | |
sudo tar -C /usr/local -xzf go1.10.2.linux-amd64.tar.gz | |
# + (ii) move go language binary into ~/zshrc PATH | |
echo "# include golang in PATH" >> ~/.zshrc | |
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.zshrc | |
source ~/.zshrc | |
cd ~ | |
rm -rf ~/__tempdldir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment