1
0
mirror of https://gitlab.com/JKANetwork/jka-toolkit.git synced 2026-02-15 09:31:32 +01:00

Merge branch 'master' of gitlab.com:JKANetwork/jka-toolkit into hotfix

This commit is contained in:
JoseluCross
2016-06-17 10:15:49 +02:00
7 changed files with 132 additions and 35 deletions

View File

@@ -9,9 +9,10 @@ echo "installer has to run as root / with sudo"
exit exit
fi fi
cp jka-toolkit/{apw,jkazip} /usr/bin/ cp jka-toolkit/{apw,jkazip,gitd} /usr/bin/
chmod +x /usr/bin/apw chmod +x /usr/bin/apw
chmod +x /usr/bin/jkazip chmod +x /usr/bin/jkazip
chmod +x /usr/bin/gitd
#Languages #Languages
cp jka-toolkit/i18n/apw/es.mo /usr/share/locale/es/LC_MESSAGES/apw.mo cp jka-toolkit/i18n/apw/es.mo /usr/share/locale/es/LC_MESSAGES/apw.mo
cp jka-toolkit/i18n/jkazip/es.mo /usr/share/locale/es/LC_MESSAGES/jkazip.mo cp jka-toolkit/i18n/jkazip/es.mo /usr/share/locale/es/LC_MESSAGES/jkazip.mo

View File

@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# apw, a simple packager wrapper for Arch, Debian, RedHat/Fedora, CentOS 6, Suse, and all his derivates) # apw, a simple packager wrapper for Arch, Debian, RedHat/Fedora, CentOS 6, Suse, Void, and more)
# It simplifies the process of remembering pacman,apt,dnf, etc , all in one called apw # It simplifies the process of remembering pacman,apt,dnf, etc , all in one called apw
# Author: JKA Network - contacto@jkanetwork.com # Author: JKA Network - contacto@jkanetwork.com
@@ -10,7 +10,7 @@
export TEXTDOMAIN='apw' export TEXTDOMAIN='apw'
export TEXTDOMAINDIR='/usr/share/locale' export TEXTDOMAINDIR='/usr/share/locale'
#Version variable #Version variable
version="1.8" version="1.8.1"
#This option is for make if case insensitive #This option is for make if case insensitive
shopt -s nocasematch shopt -s nocasematch
@@ -52,7 +52,7 @@ if [[ ! -f /etc/apw.conf ]];then
echo "$(gettext "It's the first run of the program, we need a thing before continue")" echo "$(gettext "It's the first run of the program, we need a thing before continue")"
echo "$(gettext "What, or in what is based your Linux?")" echo "$(gettext "What, or in what is based your Linux?")"
echo "$(gettext "(The answer will be recorded in /etc/apw.conf, if you want to reset apw, delete this file)")" echo "$(gettext "(The answer will be recorded in /etc/apw.conf, if you want to reset apw, delete this file)")"
options=("Debian/Ubuntu (apt)" "Fedora/Redhat (dnf)" "CentOS 6 (yum)" "Archlinux (pacman)" "Suse (zypper)") options=("Debian/Ubuntu (apt)" "Fedora/Redhat (dnf)" "CentOS 6 (yum)" "Archlinux (pacman)" "Suse (zypper)" "Void Linux (XBPS)")
select opt in "${options[@]}" select opt in "${options[@]}"
do do
case $opt in case $opt in
@@ -76,6 +76,10 @@ if [[ ! -f /etc/apw.conf ]];then
echo "zypper" > /etc/apw.conf echo "zypper" > /etc/apw.conf
break break
;; ;;
"Void Linux (XBPS)")
echo "xbps" > /etc/apw.conf
break
;;
esac esac
done done
fi fi
@@ -114,6 +118,8 @@ case "$1" in
pacman -Syu $packages;; pacman -Syu $packages;;
yum | dnf | zypper) yum | dnf | zypper)
$SO update;; $SO update;;
xbps)
xbps-install -Su;;
esac;; esac;;
Uf|-Uf) Uf|-Uf)
echo $(gettext "Force updating system") echo $(gettext "Force updating system")
@@ -125,6 +131,9 @@ case "$1" in
yum | dnf | zypper) yum | dnf | zypper)
echo "$(gettext "Not supported on your distribution. Doing -U instead")" echo "$(gettext "Not supported on your distribution. Doing -U instead")"
$SO update;; $SO update;;
xbps)
echo "$(gettext "Not supported on your distribution. Doing -U instead")"
xbps-install -Su;;
esac;; esac;;
Uy|-Uy) Uy|-Uy)
echo $updating echo $updating
@@ -137,6 +146,9 @@ case "$1" in
$SO -y update;; $SO -y update;;
zypper) zypper)
$SO --non-interactive update;; $SO --non-interactive update;;
xbps)
echo "$(gettext "Not supported on your distribution. Doing -U instead")"
xbps-install -Su;;
esac;; esac;;
I|-I) I|-I)
printf -- "$(gettext "You are going to install %s and dependencies")" "$packages" printf -- "$(gettext "You are going to install %s and dependencies")" "$packages"
@@ -148,6 +160,8 @@ case "$1" in
pacman -Syu $packages --needed;; pacman -Syu $packages --needed;;
yum | dnf | zypper) yum | dnf | zypper)
$SO install $packages;; $SO install $packages;;
xbps)
xbps-install -S $packages;;
esac;; esac;;
Iy|-Iy) Iy|-Iy)
printf -- "$(gettext "You are going to install %s and dependencies")" "$packages" printf -- "$(gettext "You are going to install %s and dependencies")" "$packages"
@@ -161,6 +175,9 @@ case "$1" in
$SO -y install $packages;; $SO -y install $packages;;
zypper) zypper)
$SO --non-interactive install $packages;; $SO --non-interactive install $packages;;
xbps)
echo "$(gettext "Not supported on your distribution. Doing -I instead")"
xbps-install -S $packages;;
esac;; esac;;
Ir|-Ir) Ir|-Ir)
printf -- "$(gettext "You are going to reinstall %s")" "$packages" printf -- "$(gettext "You are going to reinstall %s")" "$packages"
@@ -172,6 +189,9 @@ case "$1" in
pacman -Syu $packages;; pacman -Syu $packages;;
yum | dnf | zypper) yum | dnf | zypper)
$SO reinstall $packages;; $SO reinstall $packages;;
xbps)
echo "$(gettext "Not supported on your distribution. Reconfiguring instead")"
xbps-reconfigure -f $packages
esac;; esac;;
Iry|-Iry) Iry|-Iry)
printf -- "$(gettext "You are going to reinstall %s")" "$packages" printf -- "$(gettext "You are going to reinstall %s")" "$packages"
@@ -184,6 +204,9 @@ case "$1" in
$SO -y reinstall $packages;; $SO -y reinstall $packages;;
zypper) zypper)
$SO --non-interactive reinstall $packages;; $SO --non-interactive reinstall $packages;;
xbps)
echo "$(gettext "Not supported on your distribution. Reconfiguring instead")"
xbps-reconfigure -f $packages
esac;; esac;;
R|-R) R|-R)
printf -- "$(gettext "You are going to remove %s")" "$packages" printf -- "$(gettext "You are going to remove %s")" "$packages"
@@ -194,6 +217,8 @@ case "$1" in
pacman -R $packages;; pacman -R $packages;;
yum | dnf | zypper) yum | dnf | zypper)
$SO remove $packages;; $SO remove $packages;;
xbps)
xbps-remove $packages;;
esac;; esac;;
Ry|-Ry) Ry|-Ry)
printf -- "$(gettext "You are going to remove %s")" "$packages" printf -- "$(gettext "You are going to remove %s")" "$packages"
@@ -206,6 +231,9 @@ case "$1" in
$SO -y remove $packages;; $SO -y remove $packages;;
zypper) zypper)
$SO --non-interactive remove $packages;; $SO --non-interactive remove $packages;;
xbps)
echo "$(gettext "Not supported on your distribution. Doing -I instead")"
xbps-remove $packages;;
esac;; esac;;
Rd|-Rd) Rd|-Rd)
printf -- "$(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"
@@ -213,6 +241,8 @@ case "$1" in
case "$SO" in case "$SO" in
pacman) pacman)
pacman -Rs $packages;; pacman -Rs $packages;;
xbps)
xbps-remove -R $packages;;
*) *)
echo "$(gettext "Not supported on your distribution")";; echo "$(gettext "Not supported on your distribution")";;
esac;; esac;;
@@ -222,6 +252,9 @@ case "$1" in
case "$SO" in case "$SO" in
pacman) pacman)
pacman -Rs $packages --noconfirm;; pacman -Rs $packages --noconfirm;;
xbps)
echo "$(gettext "Not supported on your distribution. Doing -Rd instead")"
xbps-remove -R $packages;;
*) *)
echo "$(gettext "Not supported on your distribution")";; echo "$(gettext "Not supported on your distribution")";;
esac;; esac;;
@@ -241,6 +274,8 @@ case "$1" in
dnf clean all --enablerepo=\*;; dnf clean all --enablerepo=\*;;
zypper) zypper)
zypper clean;; zypper clean;;
xbps)
xbps-remove -O;;
esac;; esac;;
Cd|-Cd) Cd|-Cd)
echo "$(gettext "Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY ADVANCED)")" echo "$(gettext "Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY ADVANCED)")"
@@ -251,6 +286,8 @@ case "$1" in
pacman -Rs $(pacman -Qdtq);; pacman -Rs $(pacman -Qdtq);;
zypper) zypper)
zypper --clean-deps;; zypper --clean-deps;;
xbps)
xbps-remove -o;;
*) *)
echo "$(gettext "Not supported on your distribution")";; echo "$(gettext "Not supported on your distribution")";;
esac;; esac;;
@@ -262,6 +299,8 @@ case "$1" in
pacman -Ss $packages;; pacman -Ss $packages;;
apr | yum | dnf | zypper) apr | yum | dnf | zypper)
$SO search $packages;; $SO search $packages;;
xbps)
xbps-query $packages;;
esac;; esac;;
F|-F) F|-F)
printf -- "$(gettext "Installing files: %s")" "$packages" printf -- "$(gettext "Installing files: %s")" "$packages"
@@ -273,6 +312,8 @@ case "$1" in
pacman -U $packages;; pacman -U $packages;;
yum | dnf | zypper) yum | dnf | zypper)
rpm -Uvh $packages;; rpm -Uvh $packages;;
xbps)
echo "$(gettext "Not supported on your distribution")";;
esac;; esac;;
*) *)
echo "$(gettext "Invalid option especified")" echo "$(gettext "Invalid option especified")"

31
jka-toolkit/gitd Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
VERSION="0.1"
gitopt=`dialog --stdout --scrollbar --menu "gitd, git dialog" 0 0 6 p "Descargar actualizaciones del git (Hacer pull)" s "Subir actualizaciones al git (Hacer push)" c "Descargar un nuevo git (Hacer clone)" b "Cambiar de branch/rama (Hacer checkout)" m "Unir ramas (Hacer merge)"`
case $gitopt in
"p") git pull;;
"s") commit=`dialog --stdout --inputbox "Cambios (texto commit)" 10 50`
if [[ -z $commit ]];then
commit="changes"
fi
git add . && git commit -m "$commit" && git push
;;
"c")
giturl=`dialog --stdout --inputbox "URL del git" 10 60`
git clone $giturl
;;
"b")
gitbranch=`dialog --stdout --inputbox "Nueva rama/branch" 10 60`
git checkout $gitbranch
;;
"m")
until [[ $gitbusing && $gitbmerge ]]
do
gitbusing=`dialog --stdout --inputbox "Rama actual" 10 60`
gitbmerge=`dialog --stdout --inputbox "Rama con la que unir (la final,normalmente master)" 10 60`
done
git checkout $gitbmerge
git merge $gitbusing
git push
;;
esac

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-10 23:59+0200\n" "POT-Creation-Date: 2016-06-15 20:02+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -82,7 +82,7 @@ msgstr ""
msgid "apw - A Packager Wrapper" msgid "apw - A Packager Wrapper"
msgstr "" msgstr ""
#: apw:39 apw:279 #: apw:39 apw:320
msgid "Use apw -h for help" msgid "Use apw -h for help"
msgstr "" msgstr ""
@@ -104,60 +104,72 @@ msgid ""
"delete this file)" "delete this file)"
msgstr "" msgstr ""
#: apw:89 #: apw:93
msgid "No package specified, aborting" msgid "No package specified, aborting"
msgstr "" msgstr ""
#: apw:106 #: apw:110
msgid "Updating system" msgid "Updating system"
msgstr "" msgstr ""
#: apw:119 #: apw:125
msgid "Force updating system" msgid "Force updating system"
msgstr "" msgstr ""
#: apw:126 #: apw:132 apw:135 apw:150
msgid "Not supported on your distribution. Doing -U instead" msgid "Not supported on your distribution. Doing -U instead"
msgstr "" msgstr ""
#: apw:142 apw:153 #: apw:154 apw:167
msgid "You are going to install %s and dependencies" msgid "You are going to install %s and dependencies"
msgstr "" msgstr ""
#: apw:166 apw:177 #: apw:179 apw:235
msgid "Not supported on your distribution. Doing -I instead"
msgstr ""
#: apw:183 apw:197
msgid "You are going to reinstall %s" msgid "You are going to reinstall %s"
msgstr "" msgstr ""
#: apw:189 apw:199 #: apw:193 apw:208
msgid "Not supported on your distribution. Reconfiguring instead"
msgstr ""
#: apw:212 apw:224
msgid "You are going to remove %s" msgid "You are going to remove %s"
msgstr "" msgstr ""
#: apw:211 apw:220 #: apw:239 apw:250
msgid "Removing %s along with his dependencies that are not more in use" msgid "Removing %s along with his dependencies that are not more in use"
msgstr "" msgstr ""
#: apw:217 apw:226 apw:255 #: apw:247 apw:259 apw:292 apw:316
msgid "Not supported on your distribution" msgid "Not supported on your distribution"
msgstr "" msgstr ""
#: apw:229 #: apw:256
msgid "Not supported on your distribution. Doing -Rd instead"
msgstr ""
#: apw:262
msgid "Cleaning package manager" msgid "Cleaning package manager"
msgstr "" msgstr ""
#: apw:246 #: apw:281
msgid "" msgid ""
"Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY " "Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY "
"ADVANCED)" "ADVANCED)"
msgstr "" msgstr ""
#: apw:258 #: apw:295
msgid "Searching %s" msgid "Searching %s"
msgstr "" msgstr ""
#: apw:267 #: apw:306
msgid "Installing files: %s" msgid "Installing files: %s"
msgstr "" msgstr ""
#: apw:278 #: apw:319
msgid "Invalid option especified" msgid "Invalid option especified"
msgstr "" msgstr ""

Binary file not shown.

View File

@@ -92,7 +92,7 @@ msgstr "\tAñadir y a -U o -I (-Uy -Iy -Iry) para autoconfirmar la operación"
msgid "apw - A Packager Wrapper" msgid "apw - A Packager Wrapper"
msgstr "apw - A Package Wrapper" msgstr "apw - A Package Wrapper"
#: apw:39 apw:279 #: apw:39 apw:320
msgid "Use apw -h for help" msgid "Use apw -h for help"
msgstr "Usa apw -h para ver la ayuda" msgstr "Usa apw -h para ver la ayuda"
@@ -118,47 +118,59 @@ msgstr ""
"(La respuesta será guardada en /etc/apw.conf, si quieres resetear apw borra " "(La respuesta será guardada en /etc/apw.conf, si quieres resetear apw borra "
"el fichero)" "el fichero)"
#: apw:89 #: apw:93
msgid "No package specified, aborting" msgid "No package specified, aborting"
msgstr "Ningún paquete especificado, cerrando" msgstr "Ningún paquete especificado, cerrando"
#: apw:106 #: apw:110
msgid "Updating system" msgid "Updating system"
msgstr "Actualizando el sistema" msgstr "Actualizando el sistema"
#: apw:119 #: apw:125
msgid "Force updating system" msgid "Force updating system"
msgstr "Forzando la actualización del sistema" msgstr "Forzando la actualización del sistema"
#: apw:126 #: apw:132 apw:135 apw:150
msgid "Not supported on your distribution. Doing -U instead" msgid "Not supported on your distribution. Doing -U instead"
msgstr "No soportado en tu distribución. Usando -U en su lugar" msgstr "No soportado en tu distribución. Usando -U en su lugar"
#: apw:142 apw:153 #: apw:154 apw:167
msgid "You are going to install %s and dependencies" msgid "You are going to install %s and dependencies"
msgstr "Vas a instalar %s y sus dependencias" msgstr "Vas a instalar %s y sus dependencias"
#: apw:166 apw:177 #: apw:179 apw:235
msgid "Not supported on your distribution. Doing -I instead"
msgstr "No soportado en tu distribución. Usando -I en su lugar"
#: apw:183 apw:197
msgid "You are going to reinstall %s" msgid "You are going to reinstall %s"
msgstr "Vas a reinstalar %s" msgstr "Vas a reinstalar %s"
#: apw:189 apw:199 #: apw:193 apw:208
msgid "Not supported on your distribution. Reconfiguring instead"
msgstr "No soportado en tu distribución. Reconfigurando en su lugar"
#: apw:212 apw:224
msgid "You are going to remove %s" msgid "You are going to remove %s"
msgstr "Vas a borrar %s" msgstr "Vas a borrar %s"
#: apw:211 apw:220 #: apw:239 apw:250
msgid "Removing %s along with his dependencies that are not more in use" msgid "Removing %s along with his dependencies that are not more in use"
msgstr "Quitando %s junto con las dependencias que no están más en uso" msgstr "Quitando %s junto con las dependencias que no están más en uso"
#: apw:217 apw:226 apw:255 #: apw:247 apw:259 apw:292 apw:316
msgid "Not supported on your distribution" msgid "Not supported on your distribution"
msgstr "No soportado en tu distribución" msgstr "No soportado en tu distribución"
#: apw:229 #: apw:256
msgid "Not supported on your distribution. Doing -Rd instead"
msgstr "No soportado en tu distribución. Usando -Rd en su lugar"
#: apw:262
msgid "Cleaning package manager" msgid "Cleaning package manager"
msgstr "Limpiando gestor de paquetes" msgstr "Limpiando gestor de paquetes"
#: apw:246 #: apw:281
msgid "" msgid ""
"Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY " "Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY "
"ADVANCED)" "ADVANCED)"
@@ -166,14 +178,14 @@ msgstr ""
"Limpiar el sistema de dependencias que no están en uso (CUIDADO, SOLO " "Limpiar el sistema de dependencias que no están en uso (CUIDADO, SOLO "
"EXPERIMENTADOS)" "EXPERIMENTADOS)"
#: apw:258 #: apw:295
msgid "Searching %s" msgid "Searching %s"
msgstr "Buscando %s" msgstr "Buscando %s"
#: apw:267 #: apw:306
msgid "Installing files: %s" msgid "Installing files: %s"
msgstr "Instalando archivos: %s" msgstr "Instalando archivos: %s"
#: apw:278 #: apw:319
msgid "Invalid option especified" msgid "Invalid option especified"
msgstr "Opción inválida seleccionada" msgstr "Opción inválida seleccionada"

Binary file not shown.