Skip to content

Instantly share code, notes, and snippets.

@ammario
Last active September 17, 2019 21:47
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 ammario/61b49282f94a3f041af1407300d78560 to your computer and use it in GitHub Desktop.
Save ammario/61b49282f94a3f041af1407300d78560 to your computer and use it in GitHub Desktop.
Install golang
#!/bin/bash
set -euf -o pipefail
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
rm -rf /usr/local/go || true
rm /usr/local/bin/go || true
curl https://storage.googleapis.com/golang/go$GOVERSION.linux-amd64.tar.gz | tar -C /usr/local -xzf -
ln -s /usr/local/go/bin/go /usr/local/bin/go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment