From 625d1424cac33e022815308f3e256c2f2280f7d3 Mon Sep 17 00:00:00 2001
From: Pierre ROUDIER <contact@pierreroudier.net>
Date: Thu, 27 Jun 2013 21:36:23 +0200
Subject: [PATCH] xz support for tar handler

---
 handlers/tar.helper.in | 3 ++-
 handlers/tar.in        | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/handlers/tar.helper.in b/handlers/tar.helper.in
index 4a483bec..91fec34e 100644
--- a/handlers/tar.helper.in
+++ b/handlers/tar.helper.in
@@ -25,7 +25,8 @@ tar_wizard() {
        "none"     "do not filter trough" off \
        "compress" "filter trough compress" off \
        "gzip"     "filter trough gzip" off \
-       "bzip"     "filter trough bzip" on
+       "bzip"     "filter trough bzip" on \
+       "xz"       "filter trough xz" off
    [ $? = 1 ] && return;
    result="$REPLY"
    tar_compress="compress = $REPLY "
diff --git a/handlers/tar.in b/handlers/tar.in
index b4f8c58b..eb5942b8 100644
--- a/handlers/tar.in
+++ b/handlers/tar.in
@@ -48,6 +48,10 @@ case $compress in
       compress_option="-j"
       EXTENSION="tar.bz2"
       ;;
+   "xz")
+      compress_option="-J"
+      EXTENSION="tar.xz"
+      ;;
    "none")
       compress_option=""
       ;;
-- 
GitLab