Skip to content

Commit

Permalink
Fix untar to correct path more
Browse files Browse the repository at this point in the history
  • Loading branch information
sarg3nt committed May 25, 2024
1 parent ef78650 commit 882854c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -106,22 +106,21 @@ download_release() {
curl "${curl_opts[@]}" -o "$download_file" -C - "$url" || fail "Could not download $url"

case "$extension" in
"zip") unzip -j "$download_file" -d "$ASDF_DOWNLOAD_PATH/micro-$version" ;;
"tar.gz") tar -xvzf "$download_file" -C "$ASDF_DOWNLOAD_PATH/micro-$version" "micro-$version/micro" ;;
"zip") unzip -j "$download_file" -d "$ASDF_DOWNLOAD_PATH/" ;;
"tar.gz") tar -xvzf "$download_file" -C "$ASDF_DOWNLOAD_PATH/" "micro-$version/micro" ;;
esac

# tar: /tmp/asdf.bhqi/downloads/micro/2.0.13/micro-2.0.13: Cannot open: No such file or directory

echo "*** ls from dir base *** "
ls -alh "$ASDF_DOWNLOAD_PATH"
echo "*** ls from dir full *** "
ls -alh "$ASDF_DOWNLOAD_PATH/micro-$version"

mv "$ASDF_DOWNLOAD_PATH/micro-$version/micro" "$filename"
mv "$ASDF_DOWNLOAD_PATH/micro" "$filename"

echo "*** Destination file ***"
ls -alh "$filename"

rm "$download_file"
rm -rf "$ASDF_DOWNLOAD_PATH/micro-$version"
}

install_version() {
Expand Down

0 comments on commit 882854c

Please sign in to comment.