emerge-webrsync: add xz support
authorMike Frysinger <vapier@gentoo.org>
Wed, 5 Jan 2011 06:55:28 +0000 (01:55 -0500)
committerZac Medico <zmedico@gentoo.org>
Thu, 6 Jan 2011 01:48:51 +0000 (17:48 -0800)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
bin/emerge-webrsync

index 195a3de2294ec98177df3dbb024f508ddbbac454..93590436a91c1a0ddc81e4aac0623c895b3f24ca 100755 (executable)
@@ -63,6 +63,7 @@ do_tar() {
        local file=$1; shift
        local decompressor
        case ${file} in
+               *.xz)   decompressor="xzcat" ;;
                *.lzma) decompressor="lzcat" ;;
                *.bz2)  decompressor="bzcat" ;;
                *.gz)   decompressor="zcat"  ;;
@@ -229,6 +230,7 @@ do_snapshot() {
        # lzma is not supported in app-arch/tarsync, so use
        # bz2 format if we have tarsync.
        if ! type -P tarsync > /dev/null ; then
+               type -P xzcat > /dev/null && compressions="${compressions} xz"
                type -P lzcat > /dev/null && compressions="${compressions} lzma"
        fi
        type -P bzcat > /dev/null && compressions="${compressions} bz2"