Add support for xz compressed tarballs

This commit is contained in:
Tom G. Christensen 2012-05-21 20:23:30 +02:00
parent 8015851ba8
commit 0c7484d227
2 changed files with 3 additions and 1 deletions

View File

@ -383,7 +383,7 @@ get_files()
# unpack(): Unpack source
# params: $1 = source number (arrayindex)
# It will detect filetype and unpack
# .tar, .tgz, .gz, .bz2, zip and .Z supported
# .tar, .tgz, .gz, .bz2, .xz, .zip and .Z supported
unpack()
{
local source=${source[$1]}
@ -415,6 +415,7 @@ unpack()
'bz2') ${__bzip2} -dc $absfile | ${__tar} -xf -;;
'Z') ${__gzip} -dc $absfile | ${__tar} -xf -;;
'tgz') ${__gzip} -dc $absfile | ${__tar} -xf -;;
'xz') ${__xz} -dc $absfile | ${__tar} -xf -;;
'zip') ${__unzip} -q $absfile;;
*) error $E_BAD_COMPRESS unpack
esac

View File

@ -8,6 +8,7 @@ __tar=/usr/tgcware/bin/tar # GNU tar v1.14 or better please!
__vtar=/usr/bin/tar # vendor supplied tar
__bzip2=/usr/tgcware/bin/bzip2
__gzip=/usr/tgcware/bin/gzip
__xz=/usr/tgcware/bin/xz
__patch=/usr/tgcware/bin/patch # GNU patch 2.5 or better please!
__rm=/usr/bin/rm
__rmdir=/usr/bin/rmdir