Created
November 3, 2019 11:47
-
-
Save klingtnet/4914a2c13ea637eacff954907ef25ec3 to your computer and use it in GitHub Desktop.
Go installation script for Linux
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 -eo pipefail | |
_version=${1:-'1.13.4'} | |
set -u | |
rm -rf /usr/local/go | |
curl -Lsf "https://dl.google.com/go/go${_version}.linux-amd64.tar.gz" | tar -C/usr/local -xvzf- | |
cat <<HEREDOC>/etc/profile.d/go.sh | |
export PATH=$PATH:/usr/local/go/bin | |
HEREDOC | |
echo "Source /etc/login or restart" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment