From 5fbddd955038df322b53c5b8d1ec27cd6e17a22c Mon Sep 17 00:00:00 2001 From: Benji Vesterby Date: Wed, 15 Feb 2023 19:45:42 -0500 Subject: [PATCH] Fixing #37 where file url update caused 1.20 to be missing --- gvm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gvm b/gvm index cb013b1..90fddfa 100755 --- a/gvm +++ b/gvm @@ -14,7 +14,7 @@ srcd="$gvmroot/next" version="$1" versionroot="$gvmroot/$version" golanggit="https://go.googlesource.com/go" -dlroot="https://dl.google.com/go/" +dlroot="https://go.dev/dl/" update=$2 branch="master" remove=false @@ -272,7 +272,7 @@ update() { # Determine if the script is out of date and offer to update update "$@" -if [[ ! $1 =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(\.|[1-9][0-9]*)(((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?$ ]] +if [[ ! $1 =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(\.?|[1-9][0-9]*)(((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?$ ]] then if [[ "$1" != "next" ]] then @@ -420,7 +420,7 @@ else fi printf "Downloading %s\n" "$url" - if ! curl -f "$url" > "$pkgDir" + if ! curl -fsL "$url" > "$pkgDir" then fail "$(printf "Unable to curl %s\n" "$url")" fi