Skip to content

Commit

Permalink
fix arch name in macos
Browse files Browse the repository at this point in the history
  • Loading branch information
Azuki-bar committed May 29, 2023
1 parent 4e2e16f commit d588ff9
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,19 @@ download_release() {
filename="$2"

# TODO: Adapt the release URL convention for rye
machine=$(uname -m)
os=$(uname -s | tr '[:upper:]' '[:lower:]')
arch=$(uname -m)
os=""
uname=$(uname -s | tr '[:upper:]' '[:lower:]')
if [ "$uname" -eq "linux" ]; then
os="linux"
elif [ "$uname" -eq "darwin" ]; then
os="macos"
else
fail "Unsupported OS: $uname"
fi

# https://github.com/mitsuhiko/rye/releases/download/0.3.0/rye-aarch64-linux.gz
url="$GH_REPO/releases/download/${version}/${TOOL_NAME}-${machine}-${os}.gz"
url="$GH_REPO/releases/download/${version}/${TOOL_NAME}-${arch}-${os}.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 d588ff9

Please sign in to comment.