install: Use $download_url (#759)

We were only using this var in the echo, but it always said .zip, even
if we were using .tar.gz
This commit is contained in:
Grazfather 2021-03-20 11:24:56 -04:00 committed by GitHub
parent a8883bd5f2
commit 716d5ff94c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,14 +81,14 @@ else
util="$(which tar) -zxf"
fi
download_url="https://github.com/babashka/babashka/releases/download/v$version/babashka-$version-$platform-$arch.zip"
download_url="https://github.com/babashka/babashka/releases/download/v$version/babashka-$version-$platform-$arch."$ext
mkdir -p "$download_dir"
cd "$download_dir"
echo -e "Downloading $download_url to $download_dir"
rm -rf "babashka-$version-$platform-$arch."$ext
rm -rf "bb"
curl -o "babashka-$version-$platform-$arch."$ext -sL "https://github.com/babashka/babashka/releases/download/v$version/babashka-$version-$platform-$arch."$ext
curl -o "babashka-$version-$platform-$arch."$ext -sL $download_url
$util "babashka-$version-$platform-$arch."$ext
rm "babashka-$version-$platform-$arch."$ext