setup/archive: fix extraction of non-tar gz/bz2/xz/zst archives

Extract archive in the destination directory instead of the source
directory.
This commit is contained in:
oreo639 2024-01-18 13:35:38 -08:00
parent e834a1af46
commit b8edfe56a5

View file

@ -76,16 +76,16 @@ vextract() {
if [ "$dst" ]; then cd "$dst"; fi if [ "$dst" ]; then cd "$dst"; fi
case ${sfx} in case ${sfx} in
gz) gz)
gunzip -f $archive gunzip -f ${archive##*/}
;; ;;
bz2) bz2)
bunzip2 -f $archive bunzip2 -f ${archive##*/}
;; ;;
xz) xz)
unxz -f $archive unxz -f ${archive##*/}
;; ;;
zst) zst)
unzstd $archive unzstd ${archive##*/}
;; ;;
esac esac
) )