Created
December 22, 2022 19:42
-
-
Save qrkourier/0cc1a6a6d036125f6cefe715c90402e4 to your computer and use it in GitHub Desktop.
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
LATEST_GOLANG=$(wget -qO- "https://go.dev/VERSION?m=text" | /bin/grep -Po '^go(\s+)?\K\d+\.\d+\.\d+$'); | |
LATEST_GOLANG_ARCH=go${LATEST_GOLANG}.linux-$(dpkg --print-architecture).tar.gz; | |
wget -qO /tmp/${LATEST_GOLANG_ARCH} https://go.dev/dl/${LATEST_GOLANG_ARCH} | |
sudo tar -xf /tmp/${LATEST_GOLANG_ARCH} -C /usr/local/ | |
echo "~/go/bin:/usr/local/go/bin:$PATH" >> ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment