Skip to content

Commit f9def9a

Browse files
committed
main: just use tar
1 parent 4ee42aa commit f9def9a

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

bin/download

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,12 @@ mkdir -p "$ASDF_DOWNLOAD_PATH"
1313
# TODO: Adapt this to proper extension and adapt extracting strategy.
1414
release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.tar.xz"
1515

16-
release_file_tar="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.tar"
17-
18-
# Download tar.gz file to the download directory
16+
# Download tar.xz file to the download directory
1917
download_release "$ASDF_INSTALL_VERSION" "$release_file"
2018

21-
if ! type "gunzip" &>/dev/null; then
22-
echo "ERROR: Command 'gunzip' not found."
23-
echo "gunzip must be installed on your system."
24-
exit 1
25-
fi
26-
27-
gunzip -d "$release_file" || exit 1
28-
29-
tar -xf "$release_file_tar" -C "$ASDF_DOWNLOAD_PATH" || fail "Could not extract $release_file_tar"
19+
tar -xf "$release_file_tar" -C "$ASDF_DOWNLOAD_PATH" || fail "Could not extract $release_file"
3020

3121
chmod +x "${ASDF_DOWNLOAD_PATH}/$TOOL_NAME"
3222

3323
# Remove the zip file since we don't need to keep it
34-
rm "$release_file_tar"
24+
rm "$release_file"

0 commit comments

Comments
 (0)