Signed-off-by: Mike Frysinger <vapier@gentoo.org>
local file=$1; shift
local decompressor
case ${file} in
+ *.xz) decompressor="xzcat" ;;
*.lzma) decompressor="lzcat" ;;
*.bz2) decompressor="bzcat" ;;
*.gz) decompressor="zcat" ;;
# 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"