Skip to content

Instantly share code, notes, and snippets.

@codegoalie
Last active March 20, 2020 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codegoalie/cffb86f33642af400317d3156fdc5dd4 to your computer and use it in GitHub Desktop.
Save codegoalie/cffb86f33642af400317d3156fdc5dd4 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
if [ -z "$1" ]
then
echo "Please provide a version number, like 1.13.5"
exit 1
fi
FILENAME=go$1.linux-amd64.tar.gz
URL=https://dl.google.com/go/$FILENAME
wget $URL
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf $FILENAME
rm $FILENAME
go version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment