Skip to content

Commit

Permalink
fix download
Browse files Browse the repository at this point in the history
  • Loading branch information
nsaputro-shell committed Jan 3, 2024
1 parent 04e75ed commit f10542a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 2 additions & 8 deletions bin/download
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@ source "${plugin_dir}/lib/utils.bash"

mkdir -p "$ASDF_DOWNLOAD_PATH"

# TODO: Adapt this to proper extension and adapt extracting strategy.
release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.tar.gz"
release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION"

# Download tar.gz file to the download directory
download_release "$ASDF_INSTALL_VERSION" "$release_file"

# Extract contents of tar.gz file into the download directory
tar -xzf "$release_file" -C "$ASDF_DOWNLOAD_PATH" --strip-components=1 || fail "Could not extract $release_file"

# Remove the tar.gz file since we don't need to keep it
rm "$release_file"
chmod +x "$release_file"
2 changes: 0 additions & 2 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ download_release() {

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

chmod +x "$filename"
}

get_platform() {
Expand Down

0 comments on commit f10542a

Please sign in to comment.