Last active
December 23, 2019 17:14
-
-
Save fedir/ed87c80cfcc95ad4a521bf51984c0b56 to your computer and use it in GitHub Desktop.
Go update script for Linux Mint / Ubuntu / Debian (and some other distributions)
This file contains hidden or 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 | |
# Golang upgrade script | |
# (C) 2019, Fedir RYKHTIK | |
# Usage: define the version constants and use it under the account | |
# Define target constants | |
VERSION="1.13.5" | |
OS="linux" | |
ARCH="amd64" | |
# Check previous version | |
echo "Current \"go\" version:" | |
/usr/local/go/bin/go version | |
# Remove previous go version | |
rm -rf /usr/local/go/ | |
# Install target version | |
cd /root/tmp/ | |
wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz | |
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz | |
# Check new version | |
echo "Current \"go\" version:" | |
/usr/local/go/bin/go version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment