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
1 changed files with 4 additions and 4 deletions

View File

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