summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseluCross2016-06-06 22:03:29 +0200
committerJoseluCross2016-06-06 22:03:29 +0200
commit910bbc054ea8c07dbf56be87834dc991d8c0135d (patch)
treec954e00f1627299623eb6ca60e3310ae32ad9e37
parenta543b28035d04ab35923ecf0476dca49bcb8c671 (diff)
downloadaur-910bbc054ea8c07dbf56be87834dc991d8c0135d.tar.gz
Update package, now with spanish tranlation
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD12
-rw-r--r--es.mobin0 -> 3211 bytes
-rw-r--r--jkazip254
4 files changed, 267 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e04744a31503..e0c6baa307f6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = jkazip
pkgdesc = A Package Wrapper - package wrapper for pacman (and more)
- pkgver = 0.2.2
- pkgrel = 2
+ pkgver = 1.0.0
+ pkgrel = 1
url = http://proyecto.jkanetwork.com
arch = any
groups = jka-toolkit
@@ -13,7 +13,9 @@ pkgbase = jkazip
provides = jkazip
options = !emptydirs
source = https://gitlab.com/JKANetwork/jka-toolkit/raw/master/jka-toolkit/jkazip
- md5sums = SKIP
+ source = https://gitlab.com/JKANetwork/jka-toolkit/raw/master/jka-toolkit/i18n/jkazip/es.mo
+ md5sums = d03e1b8e1af423eb72e23aaa7a5373c7
+ md5sums = 5a677c201df0958da43d991f4a246a9e
pkgname = jkazip
diff --git a/PKGBUILD b/PKGBUILD
index 03fc958f9b84..d0efa885cfc8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: JKA Network (JoseluCross, Kprkpr, Yukialba) <contacto@jkanetwork.com>
pkgname=jkazip
-pkgver=0.2.2
-pkgrel=2
+pkgver=1.0.0
+pkgrel=1
pkgdesc="A Package Wrapper - package wrapper for pacman (and more)"
arch=('any')
url="http://proyecto.jkanetwork.com"
@@ -10,10 +10,14 @@ depends=('p7zip' 'unrar' 'unzip' 'zip')
provides=('jkazip')
groups=('jka-toolkit')
options=(!emptydirs)
-source=(https://gitlab.com/JKANetwork/jka-toolkit/raw/master/jka-toolkit/jkazip)
-md5sums=('SKIP')
+source=("https://gitlab.com/JKANetwork/jka-toolkit/raw/master/jka-toolkit/jkazip"
+ "https://gitlab.com/JKANetwork/jka-toolkit/raw/master/jka-toolkit/i18n/jkazip/es.mo")
+md5sums=('d03e1b8e1af423eb72e23aaa7a5373c7'
+ '5a677c201df0958da43d991f4a246a9e')
PKGEXT=".pkg.tar.xz"
package() {
mkdir -p $pkgdir/usr/bin
+ mkdir -p $pkgdir/usr/share/locale/es/LC_MESSAGES/es
install -Dm755 $srcdir/jkazip "$pkgdir/usr/bin/"
+ install -Dm644 $srcdir/es.mo "pkgdir/usr/share/locale/es/LC_MESSAGES/jkazip.mo"
}
diff --git a/es.mo b/es.mo
new file mode 100644
index 000000000000..c63e8e2aabf3
--- /dev/null
+++ b/es.mo
Binary files differ
diff --git a/jkazip b/jkazip
new file mode 100644
index 000000000000..dbc700e04a53
--- /dev/null
+++ b/jkazip
@@ -0,0 +1,254 @@
+#!/bin/bash
+#JKA - ZIP
+#A script for de/compress files and folders in many formats
+#Author: JKA Network - contacto@jkanetwork.com
+#Function decompress(); decompress the file whith the format especified
+
+# gettext initialization
+export TEXTDOMAIN='jkazip'
+export TEXTDOMAINDIR='/usr/share/locale'
+
+function decompress() {
+ 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".")
+ else
+ format=$(echo $1 | cut -f1 -d".")
+ format2=$(echo $1 | cut -f2 -d".")
+ fi
+ if [ $format = "tar" ];then
+ if [ -z $format2 ];then
+ tar xvf $2
+ if [ $? -eq 0 ];then
+ printf -- $msg_de
+ echo
+ fi
+ elif [ $format2 = "gz" ];then
+ tar xvzf $2
+ if [ $? -eq 0 ];then
+ printf -- $msg_de
+ echo
+ fi
+ elif [ $format2 = "bz2" ];then
+ tar xvjf $2
+ if [ $? -eq 0 ];then
+ printf -- $msg_de
+ echo
+ fi
+ elif [ $format2 = "xz" ];then
+ tar xvJf $2
+ if [ $? -eq 0 ];then
+ printf -- $msg_de
+ echo
+ fi
+ fi
+ elif [ $format = "tbz2" ];then
+ tar xvjf $2
+ if [ $? -eq 0 ];then
+ printf -- $msg_de
+ echo
+ fi
+ elif [ $format = "tgz" ];then
+ tar xvjf $2
+ if [ $? -eq 0 ];then
+ printf -- $msg_de
+ echo
+ fi
+ elif [ $format = "txz" ];then
+ tar xvJf $2
+ if [ $? -eq 0 ];then
+ printf -- $msg_de
+ echo
+ fi
+ elif [ $format = "7z" -o $format = "7zip" ];then
+ 7z e $2
+ if [ $? -eq 0 ];then
+ printf -- $msg_de
+ echo
+ fi
+ elif [ $format = "zip" ];then
+ unzip $2
+ if [ $? -eq 0 ];then
+ printf -- $msg_de
+ echo
+ fi
+ elif [ $format = "gz" -o $format = "gzip" ];then
+ gzip -dk $2
+ if [ $? -eq 0 ];then
+ printf -- $msg_de
+ echo
+ fi
+ elif [ $format = "bz2" -o $format = "bzip" ];then
+ bzip2 -dk $2
+ if [ $? -eq 0 ];then
+ printf -- $msg_de
+ echo
+ fi
+ elif [ $format = "rar" ];then
+ rar -x $2
+ if [ $? -eq 0 ];then
+ printf -- $msg_de
+ echo
+ fi
+ else
+ printf -- "$(gettext "Format %s unknown")" "$format"
+ echo
+ fi
+}
+version="1.0.0"
+if [ -z $1 ];then
+ echo "$(gettext "No option specified, use jkazip -h")"
+elif [ $1 = "-h" ];then
+ echo "$(gettext " synopsis: jkazip <options> <file or directory>")"
+ echo ""
+ echo "$(gettext " -d, decompress file")"
+ echo "$(gettext " -f <format>, specified format whe decompress, necessary only when the name have more than one point before the file extension")"
+ echo "$(gettext " -c <format>, compress file")"
+ echo "$(gettext " -h, show help box and exit")"
+ echo "$(gettext " -v, show version")"
+ echo ""
+ echo "$(gettext " The order must be \"jkazip -d [-f format] <file or directory>\" or \"jkazip -c <format> <file or directory\"")"
+ echo ""
+ echo "$(gettext " Examples")"
+ echo "$(gettext " jkazip -d -f \"tar.gz\" file.txt.tar.gz")"
+ 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 " Only one file or directory (some formats don't support directories), for more options use the each program individualy")"
+ echo ""
+elif [ $1 = "-v" ];then
+ 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")"
+ exit
+ elif [ $2 = "-f" ];then
+ files=1
+ elif [ -d $2 ];then
+ files=0
+ printf -- "$(gettext "Directory %s will be decompressed")" "$2"
+ echo
+ elif [ -f $2 ];then
+ files=0
+ echo "$(gettext "File $ will be decompressed")"
+ else
+ 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
+ printf -- "$(gettext "Directory %s will be decompressed")" "$4"
+ echo
+ elif [ -f $4 ];then
+ printf -- "$(gettext "File %s will be decompressed")" "$4"
+ echo
+ else
+ printf -- "$(gettext "%s no sush a file or directory")" "$4"
+ echo
+ exit
+ fi
+ decompress $3 $4
+ fi
+elif [ $1 = "-c" ];then
+ if [ -z $3 ];then
+ echo "$(gettext "No file or directory specified")"
+ exit
+ elif [ -d $3 ];then
+ printf -- "$(gettext "The directory %s will be compressed")" "$3"
+ echo
+ elif [ -f $3 ];then
+ printf -- "$(gettext "The file %s will be compressed")" "$3"
+ echo
+ else
+ printf -- "$(gettext "%s no such file or directory")" "$3"
+ echo
+ exit
+ fi
+ 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
+ printf -- $msg_co
+ echo
+ fi
+ elif [ $2 = "tar.gz" ] 2> /dev/null ;then
+ tar cvzf $3.tar.gz $3
+ if [ $? -eq 0 ];then
+ printf -- $msg_co
+ echo
+ fi
+ elif [ $2 = "tar.bz2" ] 2> /dev/null ;then
+ tar cvjf $3.tar.bz2 $3
+ if [ $? -eq 0 ];then
+ printf -- $msg_co
+ echo
+ fi
+ elif [ $2 = "tar.xz" ] 2> /dev/null ;then
+ tar cvJf $3.tar.xz $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
+ printf -- $msg_co
+ echo
+ fi
+ elif [ $2 = "tgz" ] 2> /dev/null ;then
+ tar cvjf $3.tgz $3
+ if [ $? -eq 0 ];then
+ printf -- $msg_co
+ echo
+ fi
+ elif [ $2 = "txz" ] 2> /dev/null ;then
+ tar cvJf $3.txz $3
+ if [ $? -eq 0 ];then
+ printf -- $msg_co
+ echo
+ fi
+ elif [ $2 = "7z" -o $2 = "7zip" ] 2> /dev/null ;then
+ 7z a $3.7z $3
+ if [ $? -eq 0 ];then
+ printf -- $msg_co
+ echo
+ fi
+ elif [ $2 = "zip" ] 2> /dev/null ;then
+ zip $3.zip $3
+ if [ $? -eq 0 ];then
+ printf -- $msg_co
+ echo
+ fi
+ elif [ $2 = "gz" -o $2 = "gzip" ] 2> /dev/null ;then
+ gzip -9k $3
+ if [ $? -eq 0 ];then
+ printf -- $msg_co
+ echo
+ fi
+ elif [ $2 = "bz2" -o $2 = "bzip2" ] 2> /dev/null ;then
+ bzip2 -k $3
+ if [ $? -eq 0 ];then
+ printf -- $msg_co
+ echo
+ fi
+ elif [ $2 = "rar" ] 2> /dev/null ;then
+ rar -a $3.rar $3
+ if [ $? -eq 0 ];then
+ printf -- $msg_co
+ echo
+ fi
+ else
+ printf -- "$(gettext "Format %s unknown")" "$2"
+ echo
+ fi
+else
+ echo "$(gettext "Unknown option")"
+fi