Skip to content

Instantly share code, notes, and snippets.

@tphdev
Created May 14, 2018 17:05
Show Gist options
  • Save tphdev/fc1d1b70ffd3bd7369fc30f80c89eb36 to your computer and use it in GitHub Desktop.
Save tphdev/fc1d1b70ffd3bd7369fc30f80c89eb36 to your computer and use it in GitHub Desktop.
install-go.sh
#!/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