Skip to content

Commit

Permalink
Fixing #37 where file url update caused 1.20 to be missing
Browse files Browse the repository at this point in the history
  • Loading branch information
benjivesterby committed Feb 16, 2023
1 parent f986843 commit 5fbddd9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gvm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5fbddd9

Please sign in to comment.