Skip to content

Commit

Permalink
formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
robzr committed Mar 14, 2024
1 parent 6a29822 commit 3ae3807
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/download
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ release_file_prefix="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION"
download_release "$ASDF_INSTALL_VERSION" "$release_file_prefix"

# Extract contents of archive file
if [ -f "${release_file_prefix}.zip" ] ; then
if [ -f "${release_file_prefix}.zip" ]; then
unzip -q "${release_file_prefix}.zip" -d "$ASDF_DOWNLOAD_PATH" || fail "Could not extract ${release_file_prefix}.zip"
else
tar -xzf "${release_file_prefix}.tar.gz" -C "$ASDF_DOWNLOAD_PATH" || fail "Could not extract ${release_file_prefix}.tar.gz"
Expand Down
4 changes: 2 additions & 2 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ download_release() {
url_prefix="$GH_REPO/releases/download/v${version}/${TOOL_NAME}_${platform}_${arch}"

found=false
for extension in zip tar.gz ; do
for extension in zip tar.gz; do

echo "* Downloading $TOOL_NAME release $version (trying $extension)..."
if curl "${curl_opts[@]}" -o "${filename}.${extension}" -C - "${url_prefix}.${extension}" ; then
if curl "${curl_opts[@]}" -o "${filename}.${extension}" -C - "${url_prefix}.${extension}"; then
found=true
break
fi
Expand Down

0 comments on commit 3ae3807

Please sign in to comment.