Skip to content

Instantly share code, notes, and snippets.

Last active December 23, 2019 17:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Go update script for Linux Mint / Ubuntu / Debian (and some other distributions)
# Golang upgrade script
# (C) 2019, Fedir RYKHTIK
# Usage: define the version constants and use it under the account
# Define target constants
# 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/
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