1
0
mirror of https://gitlab.com/JKANetwork/jka-toolkit.git synced 2026-02-24 05:53:48 +01:00

Finished spanish transltations

This commit is contained in:
JoseluCross
2016-06-06 20:22:08 +02:00
parent a67be65642
commit 847cbd90a9
11 changed files with 226 additions and 160 deletions

View File

@@ -10,7 +10,7 @@
export TEXTDOMAIN='apw'
export TEXTDOMAINDIR='/usr/share/locale'
#Version variable
version="1.6"
version="1.6.1"
#This option is for make if case insensitive
shopt -s nocasematch
@@ -18,7 +18,8 @@ shopt -s nocasematch
#Basic info echo
case "$1" in
*h)
echo "$(gettext "apw - A Packager Wrapper, a Idea from JKA Network, version %s")"
printf -- "$(gettext "apw - A Packager Wrapper, a Idea from JKA Network, version %s")" "$version"
echo
echo "$(gettext " Usage: apw <option> [packages]")"
echo "$(gettext " {-h | h} Show this help")"
echo "$(gettext " {-U | U} Update system")"
@@ -122,7 +123,8 @@ case "$1" in
$SO update;;
esac;;
*I)
echo "$(gettext "You are going to install %s and dependencies" $packages)"
printf -- "$(gettext "You are going to install %s and dependencies")" "$packages"
echo
case "$SO" in
apt)
apt update && apt install $packages;;
@@ -132,7 +134,8 @@ case "$1" in
$SO install $packages;;
esac;;
*Iy)
echo "$(gettext "You are going to install %s and dependencies" $packages)"
printf -- "$(gettext "You are going to install %s and dependencies")" "$packages"
echo
case "$SO" in
apt)
apt update && apt -y install $packages;;
@@ -143,7 +146,8 @@ case "$1" in
$SO install $packages;;
esac;;
*Ir)
echo "$(gettext "You are going to reinstall %s" $packages)"
printf -- "$(gettext "You are going to reinstall %s")" "$packages"
echo
case "$SO" in
apt)
apt update && apt install --reinstall $packages;;
@@ -164,7 +168,7 @@ case "$1" in
$SO reinstall $packages;;
esac;;
*R)
echo "$(gettext "You are going to remove %s" $packages)"
printf -- "$(gettext "You are going to remove %s")" "$packages"
case "$SO" in
apt)
apt remove $packages;;
@@ -174,7 +178,7 @@ case "$1" in
$SO remove $packages;;
esac;;
*Ry)
echo "$(gettext "You are going to remove %s" $packages)"
printf -- "$(gettext "You are going to remove %s")" "$packages"
case "$SO" in
apt)
apt -y remove $packages;;
@@ -185,7 +189,8 @@ case "$1" in
$SO remove $packages;;
esac;;
*Rd)
echo "$(gettext "Removing %s along with his dependencies that are not more in use" $packages)"
printf -- "$(gettext "Removing %s along with his dependencies that are not more in use")" "$packages"
echo
case "$SO" in
pacman)
pacman -Rs $packages;;
@@ -193,7 +198,8 @@ case "$1" in
echo "$(gettext "Not supported on your distribution")";;
esac;;
*Rdy)
echo "$(gettext "Removing %s along with his dependencies that are not more in use" $packages)"
printf -- "$(gettext "Removing %s along with his dependencies that are not more in use")" "$packages"
echo
case "$SO" in
pacman)
pacman -Rs $packages --noconfirm;;
@@ -228,7 +234,8 @@ case "$1" in
echo "$(gettext "Not supported on your distribution")";;
esac;;
*S)
echo "$(gettext "Searching %s" $packages)"
printf -- "$(gettext "Searching %s")" "$packages"
echo
case "$SO" in
pacman)
pacman -Ss $packages;;
@@ -236,7 +243,8 @@ case "$1" in
$SO search $packages;;
esac;;
*F)
echo "$(gettext "Installing files: %s"$packages)"
printf -- "$(gettext "Installing files: %s")" "$packages"
echo
case "$SO" in
apt)
dpkg -I $packages;;

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-06 17:25+0200\n"
"POT-Creation-Date: 2016-06-06 20:17+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -21,143 +21,147 @@ msgstr ""
msgid "apw - A Packager Wrapper, a Idea from JKA Network, version %s"
msgstr ""
#: apw:22
#: apw:23
msgid "\tUsage: apw <option> [packages]"
msgstr ""
#: apw:23
#: apw:24
msgid "\t{-h | h} \tShow this help"
msgstr ""
#: apw:24
#: apw:25
msgid "\t{-U | U}\tUpdate system"
msgstr ""
#: apw:25
#: apw:26
msgid ""
"\t{-I | I}\tInstall packages (Updates system also for preventing problems)"
msgstr ""
#: apw:26
#: apw:27
msgid ""
"\t{-Ir | Ir}\tReinstall packages (Updates system also for preventing "
"problems)"
msgstr ""
#: apw:27
#: apw:28
msgid "\t{-R | R}\tRemoves a package"
msgstr ""
#: apw:28
#: apw:29
msgid ""
"\t{-Rd | Rd}\tRemoves a package along with dependencies that are not more in "
"use (Only for Arch)"
msgstr ""
#: apw:29
#: apw:30
msgid "\t{-C | C}\tClean temp files"
msgstr ""
#: apw:30
#: apw:31
msgid ""
"\t{-Cd | Cd}\tClean system from dependencies that are not in use (ADVANCED, "
"BE CAREFUL!)"
msgstr ""
#: apw:31
#: apw:32
msgid "\t{-S | S}\tSearch in package database"
msgstr ""
#: apw:32
#: apw:33
msgid ""
"\t{-F | F}\tInstall file (distro family dependent, e.g. .deb , .pkg.tar."
"xz,...)"
msgstr ""
#: apw:33
#: apw:34
msgid "\tAppend y to -U or -I (-Uy -Iy -Iry) for autoconfirm the operations"
msgstr ""
#: apw:37
#: apw:38
msgid "apw - A Packager Wrapper"
msgstr ""
#: apw:38 apw:250
#: apw:39 apw:258
msgid "Use apw -h for help"
msgstr ""
#: apw:46
#: apw:47
msgid "apw has to run as root, please run as root/with sudo"
msgstr ""
#: apw:51
#: apw:52
msgid "It's the first run of the program, we need a thing before continue"
msgstr ""
#: apw:52
#: apw:53
msgid "What, or in what is based your Linux?"
msgstr ""
#: apw:53
#: apw:54
msgid ""
"(The answer will be recorded in /etc/apw.conf, if you want to reset apw, "
"delete this file)"
msgstr ""
#: apw:101
#: apw:102
msgid "Updating system"
msgstr ""
#: apw:121
#: apw:122
msgid "Not supported on your distribution. Use -U instead"
msgstr ""
#: apw:125 apw:135
#: apw:126 apw:137
msgid "You are going to install %s and dependencies"
msgstr ""
#: apw:142
#: apw:145
msgid "Not supported on your distribution. Use -I instead"
msgstr ""
#: apw:146
#: apw:149
msgid "You are going to reinstall %s"
msgstr ""
#: apw:163
#: apw:167
msgid "Not supported on your distribution. Use -Ir instead"
msgstr ""
#: apw:167 apw:177
#: apw:171 apw:181
msgid "You are going to remove %s"
msgstr ""
#: apw:184
#: apw:188
msgid "Not supported on your distribution. Use -R instead"
msgstr ""
#: apw:188 apw:196
#: apw:192 apw:201
msgid "Removing %s along with his dependencies that are not more in use"
msgstr ""
#: apw:193 apw:201 apw:218 apw:228
#: apw:198 apw:207 apw:224 apw:234
msgid "Not supported on your distribution"
msgstr ""
#: apw:204
#: apw:210
msgid "Cleaning package manager"
msgstr ""
#: apw:221
#: apw:227
msgid ""
"Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY "
"ADVANCED)"
msgstr ""
#: apw:231
#: apw:237
msgid "Searching %s"
msgstr ""
#: apw:249
#: apw:246
msgid "Installing files: %s"
msgstr ""
#: apw:257
msgid "Invalid option especified"
msgstr ""

Binary file not shown.

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-06 17:30+0200\n"
"PO-Revision-Date: 2016-06-06 17:51+0200\n"
"POT-Creation-Date: 2016-06-06 19:57+0200\n"
"PO-Revision-Date: 2016-06-06 20:18+0200\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -21,7 +21,7 @@ msgstr ""
#: apw:21
msgid "apw - A Packager Wrapper, a Idea from JKA Network, version %s"
msgstr ""
"apw - A Package Wrapper (empaquetados de paquetes), una idea de JKA Network, "
"apw - A Package Wrapper (empaquetador de paquetes), una idea de JKA Network, "
"versión %s"
#: apw:22
@@ -40,127 +40,146 @@ msgstr "\t{-U | U}\tActualiza el sistema"
msgid ""
"\t{-I | I}\tInstall packages (Updates system also for preventing problems)"
msgstr ""
"\t{-I | I}\tInstala paquetes (Actualiza el sistema también para prevenir "
"problemas)"
#: apw:26
msgid ""
"\t{-Ir | Ir}\tReinstall packages (Updates system also for preventing "
"problems)"
msgstr ""
"\t{-Ir | Ir}Reinstala paquetes (Actualiza el sistema para prevenir problemas"
#: apw:27
msgid "\t{-R | R}\tRemoves a package"
msgstr ""
msgstr "\t{-R | R}\tElimina un paquete"
#: apw:28
msgid ""
"\t{-Rd | Rd}\tRemoves a package along with dependencies that are not more in "
"use (Only for Arch)"
msgstr ""
"\t{-Rd | Rd}\tElimina un paquete junto con sus dependencias que no serán mas "
"usadas (Solo para Arch)"
#: apw:29
msgid "\t{-C | C}\tClean temp files"
msgstr ""
msgstr "\t{-C | C}\tBorra los archivos temporales"
#: apw:30
msgid ""
"\t{-Cd | Cd}\tClean system from dependencies that are not in use (ADVANCED, "
"BE CAREFUL!)"
msgstr ""
"\t{-Cd | Cd}\tBorra del sistema dependencias no usadas (AVANZADO, TEN "
"CUIDADO)"
#: apw:31
msgid "\t{-S | S}\tSearch in package database"
msgstr ""
msgstr "\t{-S | S}\tBuscar en la base de datos"
#: apw:32
msgid ""
"\t{-F | F}\tInstall file (distro family dependent, e.g. .deb , .pkg.tar."
"xz,...)"
msgstr ""
"\t{-F | F}\tInstalar archivo (depende del tipo de la distribución, ej: ."
"deb, .pkg.tar.xz,...)"
#: apw:33
msgid "\tAppend y to -U or -I (-Uy -Iy -Iry) for autoconfirm the operations"
msgstr ""
msgstr "\tAñadir y a -U o -I (-Uy -Iy -Iry) para autoconfirmar la operación"
#: apw:37
msgid "apw - A Packager Wrapper"
msgstr ""
msgstr "apw - A Package Wrapper (empaquetador de paquetes)"
#: apw:38 apw:250
msgid "Use apw -h for help"
msgstr ""
msgstr "Usa apw -h para ver la ayuda"
#: apw:46
msgid "apw has to run as root, please run as root/with sudo"
msgstr ""
msgstr "apw tiene que ejecutarse como root, por favor usalo como root/sudo"
#: apw:51
msgid "It's the first run of the program, we need a thing before continue"
msgstr ""
"Esta es la primera ejecución del programa, necesitamos algo antes de "
"continuar"
#: apw:52
msgid "What, or in what is based your Linux?"
msgstr ""
msgstr "¿Qué o en qué está basado tu distribución Linux?"
#: apw:53
msgid ""
"(The answer will be recorded in /etc/apw.conf, if you want to reset apw, "
"delete this file)"
msgstr ""
"(La respuesta será guardada en /etc/apw.conf, si quieres resetear apw borra "
"el fichero)"
#: apw:101
msgid "Updating system"
msgstr ""
msgstr "Actualizando el sistema"
#: apw:121
msgid "Not supported on your distribution. Use -U instead"
msgstr ""
msgstr "No soportado en tu distribución. Usa -U en su lugar"
#: apw:125 apw:135
msgid "You are going to install %s and dependencies"
msgstr ""
msgstr "Vas a instalar %s y sus dependencias"
#: apw:142
msgid "Not supported on your distribution. Use -I instead"
msgstr ""
msgstr "No soportado en tu distribución. Usa -I en su lugar"
#: apw:146
msgid "You are going to reinstall %s"
msgstr ""
msgstr "Vas a reinstalar %s"
#: apw:163
msgid "Not supported on your distribution. Use -Ir instead"
msgstr ""
msgstr "No soportado en tu distribución. Usa -Ir en su lugar"
#: apw:167 apw:177
msgid "You are going to remove %s"
msgstr ""
msgstr "Vas a borrar %s"
#: apw:184
msgid "Not supported on your distribution. Use -R instead"
msgstr ""
msgstr "No soportado en tu distribución. Usa -R en su lugar"
#: apw:188 apw:196
msgid "Removing %s along with his dependencies that are not more in use"
msgstr ""
msgstr "Quitando %s junto con las dependencias que no están más en uso"
#: apw:193 apw:201 apw:218 apw:228
msgid "Not supported on your distribution"
msgstr ""
msgstr "No soportado en tu distribución"
#: apw:204
msgid "Cleaning package manager"
msgstr ""
msgstr "Limpiar gestor de paquetes"
#: apw:221
msgid ""
"Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY "
"ADVANCED)"
msgstr ""
"Limpiar el sistema de dependencias que no están en uso (CUIDADO, SOLO "
"EXPERIMENTADOS)"
#: apw:231
msgid "Searching %s"
msgstr ""
msgstr "Buscando %s"
#: apw:239
msgid "Installing files: %s"
msgstr "\t{-C | C}\tBorra los archivos temporales"
#: apw:249
msgid "Invalid option especified"
msgstr ""
msgstr "Opción inválida seleccionada"

Binary file not shown.

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-06 17:25+0200\n"
"PO-Revision-Date: 2016-06-06 17:29+0200\n"
"POT-Creation-Date: 2016-06-06 20:18+0200\n"
"PO-Revision-Date: 2016-06-06 20:19+0200\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -22,23 +22,23 @@ msgstr ""
msgid "%s has been decompressed"
msgstr "%s se ha descomprimido"
#: jkazip:83 jkazip:215
#: jkazip:95 jkazip:249
msgid "Format %s unknown"
msgstr "Formato %s desconocido"
#: jkazip:88
#: jkazip:101
msgid "No option specified, use jkazip -h"
msgstr "Ninguna opción especificada, use jkazip -h"
#: jkazip:90
#: jkazip:103
msgid "\tsynopsis:\tjkazip <options> <file or directory>"
msgstr "\tsinopsis:\tjkazip <opciones> <archivo o directorio>"
#: jkazip:92
#: jkazip:105
msgid "\t-d,\t\tdecompress file"
msgstr "\t-d,\t\tdescomprimir archivo"
#: jkazip:93
#: jkazip:106
msgid ""
"\t-f <format>,\tspecified format whe decompress, necessary only when the "
"name have more than one point before the file extension"
@@ -46,19 +46,19 @@ msgstr ""
"\t-f <formato>,\tespecifica el formato cuando descomprime, necesario solo "
"cuando el nombre tiene más de un punto antes de la extensión del archivo"
#: jkazip:94
#: jkazip:107
msgid "\t-c <format>,\tcompress file"
msgstr "\t-c <formato>,\tcomprimir archivo"
#: jkazip:95
#: jkazip:108
msgid "\t-h,\t\tshow help box and exit"
msgstr "\t-h,\t\tmuestra la ayuda y termina"
#: jkazip:96
#: jkazip:109
msgid "\t-v,\t\tshow version"
msgstr "\t-v,\t\tmuestra la versión"
#: jkazip:98
#: jkazip:111
msgid ""
"\tThe order must be \"jkazip -d [-f format] <file or directory>\" or "
"\"jkazip -c <format> <file or directory\""
@@ -66,27 +66,27 @@ msgstr ""
"\tEl orden debe ser \"jkazip -d [-f formato] <archivo o directorio>\" o "
"\"jkazip -c <formato> <archivo o directorio>\""
#: jkazip:100
#: jkazip:113
msgid "\tExamples"
msgstr "\tEjemplos"
#: jkazip:101
#: jkazip:114
msgid "\tjkazip -d -f \"tar.gz\" file.txt.tar.gz"
msgstr "\tjkazip -d -f \"tar.gz\" archivo.txt.tar.gz"
#: jkazip:102
#: jkazip:115
msgid "\tjkazip -d file.7z"
msgstr "\tjkazip -d archivo.7z"
#: jkazip:103
#: jkazip:116
msgid "\tjkazip -c \"tar.xz\" directory"
msgstr "\tjkazip -c \"tar.xz\" directorio"
#: jkazip:105
#: jkazip:118
msgid "\tSupported formats: tar,gzip,bzip2,xzip,7z,zip and rar"
msgstr "\tFormatos soportados: tar,gzip,bzip2,xzip,7z,zip y tar"
#: jkazip:106
#: jkazip:119
msgid ""
"\tOnly one file or directory (some formats don't support directories), for "
"more options use the each program individualy"
@@ -94,46 +94,46 @@ msgstr ""
"\tSolo un fichero o directorio (algunos formatos no soportan directorios), "
"para mas opciones usar cada programa individualmente"
#: jkazip:109
#: jkazip:122
msgid "jkazip by JKA Network; version %s"
msgstr "jkazip por JKA Network; versión %s"
#: jkazip:112 jkazip:141
#: jkazip:126 jkazip:160
msgid "No file or directory specified"
msgstr "Ningún archivo o directorio especificado"
#: jkazip:118 jkazip:130
#: jkazip:132 jkazip:146
msgid "Directory %s will be decompressed"
msgstr "El directorio %s será descomprimido"
#: jkazip:123 jkazip:148
#: jkazip:138 jkazip:169
msgid "%s no such file or directory"
msgstr "%s no existe el archivo o el directorio"
#: jkazip:132
#: jkazip:149
msgid "File %s will be decompressed"
msgstr "El archivo %s será descomprimido"
#: jkazip:134
#: jkazip:152
msgid "%s no sush a file or directory"
msgstr "%s no existe el archivo o el directorio"
#: jkazip:144
#: jkazip:163
msgid "The directory %s will be compressed"
msgstr "El directorio %s será comprimido"
#: jkazip:146
#: jkazip:166
msgid "The file %s will be compressed"
msgstr "El archivo %s será comprimido"
#: jkazip:151
#: jkazip:173
msgid "%s has been compressed"
msgstr "%s ha sido comprimido"
#: jkazip:153
#: jkazip:175
msgid "No format specified"
msgstr "Ningún formato especificado"
#: jkazip:218
#: jkazip:253
msgid "Unknown option"
msgstr "Opción desconocida"

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-06 17:25+0200\n"
"POT-Creation-Date: 2016-06-06 20:17+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -21,112 +21,112 @@ msgstr ""
msgid "%s has been decompressed"
msgstr ""
#: jkazip:83 jkazip:215
#: jkazip:95 jkazip:249
msgid "Format %s unknown"
msgstr ""
#: jkazip:88
#: jkazip:101
msgid "No option specified, use jkazip -h"
msgstr ""
#: jkazip:90
#: jkazip:103
msgid "\tsynopsis:\tjkazip <options> <file or directory>"
msgstr ""
#: jkazip:92
#: jkazip:105
msgid "\t-d,\t\tdecompress file"
msgstr ""
#: jkazip:93
#: jkazip:106
msgid ""
"\t-f <format>,\tspecified format whe decompress, necessary only when the "
"name have more than one point before the file extension"
msgstr ""
#: jkazip:94
#: jkazip:107
msgid "\t-c <format>,\tcompress file"
msgstr ""
#: jkazip:95
#: jkazip:108
msgid "\t-h,\t\tshow help box and exit"
msgstr ""
#: jkazip:96
#: jkazip:109
msgid "\t-v,\t\tshow version"
msgstr ""
#: jkazip:98
#: jkazip:111
msgid ""
"\tThe order must be \"jkazip -d [-f format] <file or directory>\" or "
"\"jkazip -c <format> <file or directory\""
msgstr ""
#: jkazip:100
#: jkazip:113
msgid "\tExamples"
msgstr ""
#: jkazip:101
#: jkazip:114
msgid "\tjkazip -d -f \"tar.gz\" file.txt.tar.gz"
msgstr ""
#: jkazip:102
#: jkazip:115
msgid "\tjkazip -d file.7z"
msgstr ""
#: jkazip:103
#: jkazip:116
msgid "\tjkazip -c \"tar.xz\" directory"
msgstr ""
#: jkazip:105
#: jkazip:118
msgid "\tSupported formats: tar,gzip,bzip2,xzip,7z,zip and rar"
msgstr ""
#: jkazip:106
#: jkazip:119
msgid ""
"\tOnly one file or directory (some formats don't support directories), for "
"more options use the each program individualy"
msgstr ""
#: jkazip:109
#: jkazip:122
msgid "jkazip by JKA Network; version %s"
msgstr ""
#: jkazip:112 jkazip:141
#: jkazip:126 jkazip:160
msgid "No file or directory specified"
msgstr ""
#: jkazip:118 jkazip:130
#: jkazip:132 jkazip:146
msgid "Directory %s will be decompressed"
msgstr ""
#: jkazip:123 jkazip:148
#: jkazip:138 jkazip:169
msgid "%s no such file or directory"
msgstr ""
#: jkazip:132
#: jkazip:149
msgid "File %s will be decompressed"
msgstr ""
#: jkazip:134
#: jkazip:152
msgid "%s no sush a file or directory"
msgstr ""
#: jkazip:144
#: jkazip:163
msgid "The directory %s will be compressed"
msgstr ""
#: jkazip:146
#: jkazip:166
msgid "The file %s will be compressed"
msgstr ""
#: jkazip:151
#: jkazip:173
msgid "%s has been compressed"
msgstr ""
#: jkazip:153
#: jkazip:175
msgid "No format specified"
msgstr ""
#: jkazip:218
#: jkazip:253
msgid "Unknown option"
msgstr ""

View File

@@ -9,7 +9,7 @@ export TEXTDOMAIN='jkazip'
export TEXTDOMAINDIR='/usr/share/locale'
function decompress() {
msg_de="$(gettext "%s has been decompressed" $2)"
msg_de=""$(gettext "%s has been decompressed")" "$2""
if [ $files -eq 0 ];then
format=$(ls $2 | cut -f2 -d".")
format2=$(ls $2 | cut -f3 -d".")
@@ -21,66 +21,79 @@ function decompress() {
if [ -z $format2 ];then
tar xvf $2
if [ $? -eq 0 ];then
echo $msg_de
printf -- $msg_de
echo
fi
elif [ $format2 = "gz" ];then
tar xvzf $2
if [ $? -eq 0 ];then
echo $msg_de
printf -- $msg_de
echo
fi
elif [ $format2 = "bz2" ];then
tar xvjf $2
if [ $? -eq 0 ];then
echo $msg_de
printf -- $msg_de
echo
fi
elif [ $format2 = "xz" ];then
tar xvJf $2
if [ $? -eq 0 ];then
echo $msg_de
printf -- $msg_de
echo
fi
fi
elif [ $format = "tbz2" ];then
tar xvjf $2
if [ $? -eq 0 ];then
echo $msg_de
printf -- $msg_de
echo
fi
elif [ $format = "tgz" ];then
tar xvjf $2
if [ $? -eq 0 ];then
echo $msg_de
printf -- $msg_de
echo
fi
elif [ $format = "txz" ];then
tar xvJf $2
if [ $? -eq 0 ];then
echo $msg_de
printf -- $msg_de
echo
fi
elif [ $format = "7z" -o $format = "7zip" ];then
7z e $2
if [ $? -eq 0 ];then
echo $msg_de
printf -- $msg_de
echo
fi
elif [ $format = "zip" ];then
unzip $2
if [ $? -eq 0 ];then
echo $msg_de
printf -- $msg_de
echo
fi
elif [ $format = "gz" -o $format = "gzip" ];then
gzip -dk $2
if [ $? -eq 0 ];then
echo $msg_de
printf -- $msg_de
echo
fi
elif [ $format = "bz2" -o $format = "bzip" ];then
bzip2 -dk $2
if [ $? -eq 0 ];then
echo $msg_de
printf -- $msg_de
echo
fi
elif [ $format = "rar" ];then
rar -x $2
if [ $? -eq 0 ];then
echo $msg_de
printf -- $msg_de
echo
fi
else
echo "$(gettext "Format %s unknown" $format)"
printf -- "$(gettext "Format %s unknown")" "$format"
echo
fi
}
version="1.0.0"
@@ -106,7 +119,8 @@ elif [ $1 = "-h" ];then
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
echo "$(gettext "jkazip by JKA Network; version %s" $version)"
printf -- "$(gettext "jkazip by JKA Network; version %s")" "$version"
echo
elif [ $1 = "-d" ];then
if [ -z $2 ];then
echo "$(gettext "No file or directory specified")"
@@ -115,23 +129,28 @@ elif [ $1 = "-d" ];then
files=1
elif [ -d $2 ];then
files=0
echo "$(gettext "Directory %s will be decompressed" $2)"
printf -- "$(gettext "Directory %s will be decompressed")" "$2"
echo
elif [ -f $2 ];then
files=0
echo "$(gettext "File $ will be decompressed")"
else
echo "$(gettext "%s no such file or directory" $2)"
printf -- "$(gettext "%s no such file or directory")" "$2"
echo
exit
fi
if [ $files -eq 0 ];then
decompress 0 $2
elif [ $files -eq 1 ];then
if [ -d $4 ];then
echo "$(gettext "Directory %s will be decompressed" $4)"
printf -- "$(gettext "Directory %s will be decompressed")" "$4"
echo
elif [ -f $4 ];then
echo "$(gettext "File %s will be decompressed" $4)"
printf -- "$(gettext "File %s will be decompressed")" "$4"
echo
else
echo "$(gettext "%s no sush a file or directory" $4)"
printf -- "$(gettext "%s no sush a file or directory")" "$4"
echo
exit
fi
decompress $3 $4
@@ -141,78 +160,94 @@ elif [ $1 = "-c" ];then
echo "$(gettext "No file or directory specified")"
exit
elif [ -d $3 ];then
echo "$(gettext "The directory %s will be compressed" $3)"
printf -- "$(gettext "The directory %s will be compressed")" "$3"
echo
elif [ -f $3 ];then
echo "$(gettext "The file %s will be compressed" $3)"
printf -- "$(gettext "The file %s will be compressed")" "$3"
echo
else
echo "$(gettext "%s no such file or directory" $3)"
printf -- "$(gettext "%s no such file or directory")" "$3"
echo
exit
fi
msg_co="$(gettext "%s has been compressed" $3)"
msg_co=""$(gettext "%s has been compressed")" "$3""
if [ -z $2 ];then
echo "$(gettext "No format specified")"
elif [ $2 = "tar" ] 2> /dev/null ;then
tar cvf $3.tar $3
if [ $? -eq 0 ];then
echo $msg_co
printf -- $msg_co
echo
fi
elif [ $2 = "tar.gz" ] 2> /dev/null ;then
tar cvzf $3.tar.gz $3
if [ $? -eq 0 ];then
echo $msg_co
printf -- $msg_co
echo
fi
elif [ $2 = "tar.bz2" ] 2> /dev/null ;then
tar cvjf $3.tar.bz2 $3
if [ $? -eq 0 ];then
echo $msg_co
printf -- $msg_co
echo
fi
elif [ $2 = "tar.xz" ] 2> /dev/null ;then
tar cvJf $3.tar.xz $3
if [ $? -eq 0 ];then
echo $msg_co
printf -- $msg_co
echo
fi
elif [ $2 = "tbz2" ] 2> /dev/null ;then
tar cvjf $3.tbz2 $3
if [ $? -eq 0 ];then
echo $msg_co
printf -- $msg_co
echo
fi
elif [ $2 = "tgz" ] 2> /dev/null ;then
tar cvjf $3.tgz $3
if [ $? -eq 0 ];then
echo $msg_co
printf -- $msg_co
echo
fi
elif [ $2 = "txz" ] 2> /dev/null ;then
tar cvJf $3.txz $3
if [ $? -eq 0 ];then
echo $msg_co
printf -- $msg_co
echo
fi
elif [ $2 = "7z" -o $2 = "7zip" ] 2> /dev/null ;then
7z a $3.7z $3
if [ $? -eq 0 ];then
echo $msg_co
printf -- $msg_co
echo
fi
elif [ $2 = "zip" ] 2> /dev/null ;then
zip $3.zip $3
if [ $? -eq 0 ];then
echo $msg_co
printf -- $msg_co
echo
fi
elif [ $2 = "gz" -o $2 = "gzip" ] 2> /dev/null ;then
gzip -9k $3
if [ $? -eq 0 ];then
echo $msg_co
printf -- $msg_co
echo
fi
elif [ $2 = "bz2" -o $2 = "bzip2" ] 2> /dev/null ;then
bzip2 -k $3
if [ $? -eq 0 ];then
echo $msg_co
printf -- $msg_co
echo
fi
elif [ $2 = "rar" ] 2> /dev/null ;then
rar -a $3.rar $3
if [ $? -eq 0 ];then
echo $msg_co
printf -- $msg_co
echo
fi
else
echo "$(gettext "Format %s unknown" $2)"
printf -- "$(gettext "Format %s unknown")" "$2"
echo
fi
else
echo "$(gettext "Unknown option")"

View File

Binary file not shown.