From: Stéphane Graber Date: Wed, 3 Jan 2018 23:06:33 +0000 (-0500) Subject: gentoo: Add support for .xz tarballs X-Git-Tag: lxc-2.0.10~433 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=364acfc74e66cc2fce1fe7e04e694f82429a0f10;p=thirdparty%2Flxc.git gentoo: Add support for .xz tarballs Signed-off-by: Stéphane Graber --- diff --git a/templates/lxc-gentoo.in b/templates/lxc-gentoo.in index 47f24d0d5..3f07e3152 100644 --- a/templates/lxc-gentoo.in +++ b/templates/lxc-gentoo.in @@ -166,8 +166,14 @@ cache_stage3() printf " => Got: %s\n" "${stage3_latest_tarball}" printf "Downloading/untarring the actual stage3 tarball...\n" + + compressor="j" + if echo ${stage3_latest_tarball} | grep ".xz$"; then + compressor="J" + fi + wget -O - "${stage3_baseurl}/${stage3_latest_tarball}" \ - | tar -xjpf - --numeric-owner -C "${partialfs}" \ + | tar -x${compressor}pf - --numeric-owner -C "${partialfs}" \ || die 6 "Error: unable to fetch or untar\n" printf " => extracted to: %s\n" "${partialfs}" else