From f10542a7eeee7d61975f970a14f20b5da3c8d6aa Mon Sep 17 00:00:00 2001 From: Nugroho Saputro Date: Wed, 3 Jan 2024 11:50:35 +0100 Subject: [PATCH] fix download --- bin/download | 10 ++-------- lib/utils.bash | 2 -- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/bin/download b/bin/download index c11ee53..651375c 100755 --- a/bin/download +++ b/bin/download @@ -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" diff --git a/lib/utils.bash b/lib/utils.bash index 874a3b3..e5224c4 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -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() {