Commit 701a6c40 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Update Go download URLs

parent 0a647c47
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ case `uname -m` in
	arm64|aarch64) ARCH=arm64 ;;
esac
KERNEL=$(uname -s | tr '[[:upper:]]' '[[:lower:]]')
PATTERN="https:\\/\\/dl.google.com\\/go\\/go${VERSION-}[0-9.]*\\.${KERNEL}-${ARCH}\\.tar\\.gz" 
PATTERN="/dl/go${VERSION-}[0-9.]*\\.${KERNEL}-${ARCH}\\.tar\\.gz"
URL=$(wget -qO- https://golang.org/dl/ | grep -o "${PATTERN}" | head -n1) || true

if [[ ${#URL} -eq 0 ]]; then
@@ -43,6 +43,8 @@ if [[ ${#URL} -eq 0 ]]; then
	exit 1
fi

URL="https://golang.org$URL"

if [[ -z "${VERSION-}" ]]; then
	SET_DEFAULT=y
fi