Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
fix url
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Varsanyi committed Jun 25, 2023
1 parent 6879331 commit ea84877
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,21 @@ download_release() {
version="$1"
filename="$2"

# TODO: Adapt the release URL convention for mcfly
url="$GH_REPO/archive/v${version}.tar.gz"
local platform
case "$OSTYPE" in
darwin*) platform="macos" ;;
linux*) platform="unknown-linux-musl" ;;
*) fail "Unsupported platform" ;;
esac

local architecture
case "$(uname -m)" in
x86_64) architecture="x86_64" ;;
arm64) architecture="armv7" ;;
*) fail "Unsupported architecture" ;;
esac

url="$GH_REPO/releases/download/v${version}/mcfly-v${version}-${architecture}-${platform}.tar.gz"

echo "* Downloading $TOOL_NAME release $version..."
curl "${curl_opts[@]}" -o "$filename" -C - "$url" || fail "Could not download $url"
Expand Down

0 comments on commit ea84877

Please sign in to comment.