From 67de7e669c3d097470d6ee9c4410c2146c723036 Mon Sep 17 00:00:00 2001 From: JoseluCross Date: Tue, 7 Jun 2016 23:42:26 +0200 Subject: [PATCH] Add lzip support, necessary repair tranlation --- jka-toolkit/jkazip | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/jka-toolkit/jkazip b/jka-toolkit/jkazip index babf248..efe5590 100755 --- a/jka-toolkit/jkazip +++ b/jka-toolkit/jkazip @@ -42,6 +42,18 @@ function decompress() { printf -- $msg_de echo fi + elif [ $format2 = "lz" ];then + tar cvf $2 --lzip + if [ $? -eq 0 ];then + printf -- $msg_de + echo + fi + fi + elif [ $format = "tlz" ];then + tar cvf $2 --lzip + if [ $? -eq 0 ];then + printf -- $msg_de + echo fi elif [ $format = "tbz2" ];then tar xvjf $2 @@ -50,7 +62,7 @@ function decompress() { echo fi elif [ $format = "tgz" ];then - tar xvjf $2 + tar xvzf $2 if [ $? -eq 0 ];then printf -- $msg_de echo @@ -115,7 +127,7 @@ elif [ $1 = "-h" ];then echo "$(gettext " jkazip -d file.7z")" echo "$(gettext " jkazip -c \"tar.xz\" directory")" echo "" - echo "$(gettext " Supported formats: tar, gzip, bzip2, xzip, 7z, zip and rar")" + echo "$(gettext " Supported formats: tar, gzip, bzip2, xzip, lzip, 7z, zip and rar")" echo "$(gettext " Only one file or directory (some formats don't support directories), for more options use the each program individualy")" echo "" elif [ $1 = "-v" ];then @@ -197,6 +209,18 @@ elif [ $1 = "-c" ];then printf -- $msg_co echo fi + elif [ $2 = "tar.xz" ] 2> /dev/null ;then + tar cvf $3.tar.lz --lzip $3 + if [ $? -eq 0 ];then + printf -- $msg_co + echo + fi + elif [ $2 = "tlz" ] 2> /dev/null ;then + tar cvf $3.tlz --lzip $3 + if [ $? -eq 0 ];then + printf -- $msg_co + echo + fi elif [ $2 = "tbz2" ] 2> /dev/null ;then tar cvjf $3.tbz2 $3 if [ $? -eq 0 ];then @@ -234,7 +258,13 @@ elif [ $1 = "-c" ];then echo fi elif [ $2 = "bz2" -o $2 = "bzip2" ] 2> /dev/null ;then - bzip2 -k $3 + bzip2 -9k $3 + if [ $? -eq 0 ];then + printf -- $msg_co + echo + fi + elif [ $2 = "lz" -o $2 = "lzip" ] 2> /dev/null ;then + lzip -9k $3 if [ $? -eq 0 ];then printf -- $msg_co echo