Last active
March 25, 2021 21:35
-
-
Save yonderbread/388bb02b57336c0256b620bb939ffc3e 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
export VERSION="1.15.5" # Change to desired version | |
export ARCH="amd64" | |
export FILENAME="go${VERSION}.linux-${ARCH}.tar.gz" | |
curl -O -L "https://golang.org/dl/${FILENAME}" | |
tar -xf "${FILENAME}" | |
sudo chown -R root:root ./go | |
sudo mv -v go /usr/local | |
rm -rf $FILENAME | |
if [ ! -d $HOME/go ]; then | |
mkdir -p $HOME/go | |
fi | |
echo "export GOPATH=$HOME/go" >> ~/.bash_profile | |
echo "export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin" >> ~/.bash_profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment