hooks/do-extract/distfiles: simplify and support .tar.lz files.
This commit is contained in:
parent
74fc8c06a8
commit
14c15b0973
1 changed files with 4 additions and 14 deletions
|
@ -38,6 +38,8 @@ hook() {
|
||||||
|
|
||||||
case $curfile in
|
case $curfile in
|
||||||
*.tar.lzma) cursufx="txz";;
|
*.tar.lzma) cursufx="txz";;
|
||||||
|
*.tar.lz) cursufx="tlz";;
|
||||||
|
*.tlz) cursufx="tlz";;
|
||||||
*.tar.xz) cursufx="txz";;
|
*.tar.xz) cursufx="txz";;
|
||||||
*.txz) cursufx="txz";;
|
*.txz) cursufx="txz";;
|
||||||
*.tar.bz2) cursufx="tbz";;
|
*.tar.bz2) cursufx="tbz";;
|
||||||
|
@ -58,20 +60,8 @@ hook() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case ${cursufx} in
|
case ${cursufx} in
|
||||||
txz)
|
txz|tbz|tlz|tgz)
|
||||||
unxz -cf $srcdir/$curfile | tar xf - -C $extractdir
|
tar xf $srcdir/$curfile -C $extractdir
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
tbz)
|
|
||||||
bunzip2 -cf $srcdir/$curfile | tar xf - -C $extractdir
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
tgz)
|
|
||||||
gunzip -cf $srcdir/$curfile | tar xf - -C $extractdir
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
|
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue