mirror of
https://gitlab.com/JKANetwork/jka-toolkit.git
synced 2026-02-15 01:21:32 +01:00
Repair jkazip, zip compresion have recursive mode
This commit is contained in:
@@ -30,7 +30,7 @@ function msg() {
|
|||||||
local var="$1"
|
local var="$1"
|
||||||
local var2="$2"
|
local var2="$2"
|
||||||
printf -- "$(gettext "File/s %s has/have been compressed in %s")" "$var" "$var2"
|
printf -- "$(gettext "File/s %s has/have been compressed in %s")" "$var" "$var2"
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
#Function msg2, print in stdout a final message
|
#Function msg2, print in stdout a final message
|
||||||
function msg2() {
|
function msg2() {
|
||||||
@@ -39,7 +39,7 @@ function msg2() {
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
version="2.3.0"
|
version="2.3.1"
|
||||||
if [ -z "$1" ];then
|
if [ -z "$1" ];then
|
||||||
echo "$(gettext "No option specified, use jkazip -h")" > /dev/stderr
|
echo "$(gettext "No option specified, use jkazip -h")" > /dev/stderr
|
||||||
elif [ "$1" = "-h" ];then
|
elif [ "$1" = "-h" ];then
|
||||||
@@ -122,9 +122,9 @@ elif [ "$1" = "-c" ];then
|
|||||||
### Funcion nueva
|
### Funcion nueva
|
||||||
for compfile in "$@"; do
|
for compfile in "$@"; do
|
||||||
if [[ "$compfile" != "$1" && "$compfile" != "$2" ]];then
|
if [[ "$compfile" != "$1" && "$compfile" != "$2" ]];then
|
||||||
if [ ! -d "$compfile" -a ! -f "$compfile" ];then
|
if [[ ! -d "$compfile" && ! -f "$compfile" ]];then
|
||||||
printf -- "$(gettext "%s no such file or directory")" "$compfile"
|
printf -- "$(gettext "%s no such file or directory")" "$compfile"
|
||||||
echo
|
echo
|
||||||
#exit
|
#exit
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -154,7 +154,7 @@ elif [ "$1" = "-c" ];then
|
|||||||
msg "$files" "$salida"
|
msg "$files" "$salida"
|
||||||
;;
|
;;
|
||||||
"zip")
|
"zip")
|
||||||
zip "$salida" $files
|
zip -r "$salida" $files
|
||||||
msg "$files" "$salida"
|
msg "$files" "$salida"
|
||||||
;;
|
;;
|
||||||
"gz" | "lz")
|
"gz" | "lz")
|
||||||
@@ -189,7 +189,7 @@ elif [ "$1" = "-l" ];then
|
|||||||
tar taf "$2"
|
tar taf "$2"
|
||||||
;;
|
;;
|
||||||
"7z")
|
"7z")
|
||||||
7z l "$2"
|
7z l "$2"
|
||||||
;;
|
;;
|
||||||
"zip")
|
"zip")
|
||||||
uzip -v "$2"
|
uzip -v "$2"
|
||||||
|
|||||||
Reference in New Issue
Block a user