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