Last active
September 17, 2019 21:47
-
-
Save ammario/61b49282f94a3f041af1407300d78560 to your computer and use it in GitHub Desktop.
Install golang
This file contains 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 | |
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