add support for .xz compressed files
This commit is contained in:
parent
f71ec51cb3
commit
0c523c2240
|
@ -58,6 +58,7 @@ hook() {
|
||||||
*.tar.gz) cursufx="tgz";;
|
*.tar.gz) cursufx="tgz";;
|
||||||
*.tgz) cursufx="tgz";;
|
*.tgz) cursufx="tgz";;
|
||||||
*.gz) cursufx="gz";;
|
*.gz) cursufx="gz";;
|
||||||
|
*.xz) cursufx="xz";;
|
||||||
*.bz2) cursufx="bz2";;
|
*.bz2) cursufx="bz2";;
|
||||||
*.tar) cursufx="tar";;
|
*.tar) cursufx="tar";;
|
||||||
*.zip) cursufx="zip";;
|
*.zip) cursufx="zip";;
|
||||||
|
@ -84,13 +85,20 @@ hook() {
|
||||||
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
|
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
gz|bz2)
|
gz|bz2|xz)
|
||||||
cp -f $srcdir/$curfile $extractdir
|
cp -f $srcdir/$curfile $extractdir
|
||||||
if [ "$cursufx" = "gz" ]; then
|
cd $extractdir
|
||||||
cd $extractdir && gunzip -f $curfile
|
case ${cursufx} in
|
||||||
else
|
gz)
|
||||||
cd $extractdir && bunzip2 -f $curfile
|
gunzip -f $curfile
|
||||||
fi
|
;;
|
||||||
|
bz2)
|
||||||
|
bunzip2 -f $curfile
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
unxz -f $curfile
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
zip)
|
zip)
|
||||||
if command -v unzip &>/dev/null; then
|
if command -v unzip &>/dev/null; then
|
||||||
|
|
Loading…
Reference in New Issue