Last active
September 17, 2023 22:11
-
-
Save stakemepro/de050a1108dc2c1b86a0f6fd8c0a7442 to your computer and use it in GitHub Desktop.
Script installed go
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 | |
if [ ! -f "/usr/local/go/bin/go" ]; then | |
version="1.19.1" | |
wget "https://golang.org/dl/go$version.linux-amd64.tar.gz" | |
sudo rm -rf /usr/local/go | |
sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz" | |
rm "go$version.linux-amd64.tar.gz" | |
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \ | |
source ~/.bash_profile && \ | |
go version > /dev/null | |
fi | |
source $HOME/.bash_profile |
#login
bash_profile
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Login