Created
January 17, 2024 23:16
-
-
Save marshyski/bf86c6ff939096fc0d0952d05c28ac0b to your computer and use it in GitHub Desktop.
Download latest golang version for linux amd64
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/sh | |
GO_VERSION=$(curl -fsSL 'https://go.dev/VERSION?m=text' | head -n1) | |
GO_FILE="$GO_VERSION.linux-amd64.tar.gz" | |
GO_URL="https://go.dev/dl/$GO_FILE" | |
cd /usr/local || exit 1 | |
curl -fsSLO "$GO_URL" | |
tar -zxvf "$GO_FILE" | |
rm -f "$GO_FILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment