mirror of
https://gitlab.com/JKANetwork/jka-toolkit.git
synced 2026-02-21 04:13:46 +01:00
Merge branch 'hotfix'
This commit is contained in:
117
jka-toolkit/apw
117
jka-toolkit/apw
@@ -1,5 +1,5 @@
|
||||
#!/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
|
||||
# Author: JKA Network - contacto@jkanetwork.com
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
export TEXTDOMAIN='apw'
|
||||
export TEXTDOMAINDIR='/usr/share/locale'
|
||||
#Version variable
|
||||
version="1.7.1"
|
||||
version="1.8.1"
|
||||
|
||||
#This option is for make if case insensitive
|
||||
shopt -s nocasematch
|
||||
|
||||
#Basic info echo
|
||||
case "$1" in
|
||||
*h)
|
||||
h|-h)
|
||||
printf -- "$(gettext "apw - A Packager Wrapper, a Idea from JKA Network, version %s")" "$version"
|
||||
echo
|
||||
echo "$(gettext " Usage: apw <option> [packages]")"
|
||||
@@ -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 "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)")"
|
||||
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[@]}"
|
||||
do
|
||||
case $opt in
|
||||
@@ -76,6 +76,10 @@ if [[ ! -f /etc/apw.conf ]];then
|
||||
echo "zypper" > /etc/apw.conf
|
||||
break
|
||||
;;
|
||||
"Void Linux (XBPS)")
|
||||
echo "xbps" > /etc/apw.conf
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
@@ -91,8 +95,7 @@ if [[ -z $packages && ( $1 != *u* && $1 != *c* ) ]];then
|
||||
fi
|
||||
for (( i=3; i<=$#; i++ ))
|
||||
do
|
||||
valtmp=$(echo $* | cut -f$i -d" ")
|
||||
packages="$packages $valtmp"
|
||||
packages="$packages $(echo $* | cut -f$i -d" ")"
|
||||
done
|
||||
|
||||
#Check if is dnf in RedHat, or apt in Debian, new tools
|
||||
@@ -106,7 +109,7 @@ fi
|
||||
#Command wrapper
|
||||
updating="$(gettext "Updating system")"
|
||||
case "$1" in
|
||||
*U)
|
||||
U|-U)
|
||||
echo $updating
|
||||
case "$SO" in
|
||||
apt)
|
||||
@@ -115,8 +118,10 @@ case "$1" in
|
||||
pacman -Syu $packages;;
|
||||
yum | dnf | zypper)
|
||||
$SO update;;
|
||||
xbps)
|
||||
xbps-install -Su;;
|
||||
esac;;
|
||||
*Uf)
|
||||
Uf|-Uf)
|
||||
echo $(gettext "Force updating system")
|
||||
case "$SO" in
|
||||
apt)
|
||||
@@ -126,19 +131,26 @@ case "$1" in
|
||||
yum | dnf | zypper)
|
||||
echo "$(gettext "Not supported on your distribution. Doing -U instead")"
|
||||
$SO update;;
|
||||
xbps)
|
||||
echo "$(gettext "Not supported on your distribution. Doing -U instead")"
|
||||
xbps-install -Su;;
|
||||
esac;;
|
||||
*Uy)
|
||||
Uy|-Uy)
|
||||
echo $updating
|
||||
case "$SO" in
|
||||
apt)
|
||||
apt update && apt -y upgrade;;
|
||||
pacman)
|
||||
pacman -Syu $packages --noconfirm;;
|
||||
yum | dnf | zypper)
|
||||
yum | dnf)
|
||||
$SO -y update;;
|
||||
zypper)
|
||||
$SO --non-interactive update;;
|
||||
xbps)
|
||||
echo "$(gettext "Not supported on your distribution. Doing -U instead")"
|
||||
$SO update;;
|
||||
xbps-install -Su;;
|
||||
esac;;
|
||||
*I)
|
||||
I|-I)
|
||||
printf -- "$(gettext "You are going to install %s and dependencies")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
@@ -148,8 +160,10 @@ case "$1" in
|
||||
pacman -Syu $packages --needed;;
|
||||
yum | dnf | zypper)
|
||||
$SO install $packages;;
|
||||
xbps)
|
||||
xbps-install -S $packages;;
|
||||
esac;;
|
||||
*Iy)
|
||||
Iy|-Iy)
|
||||
printf -- "$(gettext "You are going to install %s and dependencies")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
@@ -157,11 +171,15 @@ case "$1" in
|
||||
apt update && apt -y install $packages;;
|
||||
pacman)
|
||||
pacman -Syu $packages --noconfirm --needed;;
|
||||
yum | dnf | zypper)
|
||||
yum | dnf)
|
||||
$SO -y install $packages;;
|
||||
zypper)
|
||||
$SO --non-interactive install $packages;;
|
||||
xbps)
|
||||
echo "$(gettext "Not supported on your distribution. Doing -I instead")"
|
||||
$SO install $packages;;
|
||||
xbps-install -S $packages;;
|
||||
esac;;
|
||||
*Ir)
|
||||
Ir|-Ir)
|
||||
printf -- "$(gettext "You are going to reinstall %s")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
@@ -171,19 +189,26 @@ case "$1" in
|
||||
pacman -Syu $packages;;
|
||||
yum | dnf | zypper)
|
||||
$SO reinstall $packages;;
|
||||
xbps)
|
||||
echo "$(gettext "Not supported on your distribution. Reconfiguring instead")"
|
||||
xbps-reconfigure -f $packages
|
||||
esac;;
|
||||
*Iry)
|
||||
Iry|-Iry)
|
||||
printf -- "$(gettext "You are going to reinstall %s")" "$packages"
|
||||
case "$SO" in
|
||||
apt)
|
||||
apt update && apt -y install --reinstall $packages;;
|
||||
pacman)
|
||||
pacman -Syu $packages --noconfirm;;
|
||||
yum | dnf | zypper)
|
||||
echo "$(gettext "Not supported on your distribution. Doing -Ir instead")"
|
||||
$SO reinstall $packages;;
|
||||
yum | dnf)
|
||||
$SO -y reinstall $packages;;
|
||||
zypper)
|
||||
$SO --non-interactive reinstall $packages;;
|
||||
xbps)
|
||||
echo "$(gettext "Not supported on your distribution. Reconfiguring instead")"
|
||||
xbps-reconfigure -f $packages
|
||||
esac;;
|
||||
*R)
|
||||
R|-R)
|
||||
printf -- "$(gettext "You are going to remove %s")" "$packages"
|
||||
case "$SO" in
|
||||
apt)
|
||||
@@ -192,37 +217,48 @@ case "$1" in
|
||||
pacman -R $packages;;
|
||||
yum | dnf | zypper)
|
||||
$SO remove $packages;;
|
||||
xbps)
|
||||
xbps-remove $packages;;
|
||||
esac;;
|
||||
*Ry)
|
||||
Ry|-Ry)
|
||||
printf -- "$(gettext "You are going to remove %s")" "$packages"
|
||||
case "$SO" in
|
||||
apt)
|
||||
apt -y remove $packages;;
|
||||
pacman)
|
||||
pacman -R $packages --noconfirm;;
|
||||
yum | dnf | zypper)
|
||||
echo "$(gettext "Not supported on your distribution. Doing -R instead")"
|
||||
$SO remove $packages;;
|
||||
yum | dnf)
|
||||
$SO -y remove $packages;;
|
||||
zypper)
|
||||
$SO --non-interactive remove $packages;;
|
||||
xbps)
|
||||
echo "$(gettext "Not supported on your distribution. Doing -I instead")"
|
||||
xbps-remove $packages;;
|
||||
esac;;
|
||||
*Rd)
|
||||
Rd|-Rd)
|
||||
printf -- "$(gettext "Removing %s along with his dependencies that are not more in use")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
pacman)
|
||||
pacman -Rs $packages;;
|
||||
xbps)
|
||||
xbps-remove -R $packages;;
|
||||
*)
|
||||
echo "$(gettext "Not supported on your distribution")";;
|
||||
esac;;
|
||||
*Rdy)
|
||||
Rdy|-Rdy)
|
||||
printf -- "$(gettext "Removing %s along with his dependencies that are not more in use")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
pacman)
|
||||
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")";;
|
||||
esac;;
|
||||
*C)
|
||||
C|-C)
|
||||
echo "$(gettext "Cleaning package manager")"
|
||||
case "$SO" in
|
||||
apt)
|
||||
@@ -237,19 +273,25 @@ case "$1" in
|
||||
dnf)
|
||||
dnf clean all --enablerepo=\*;;
|
||||
zypper)
|
||||
echo "$(gettext "Not supported on your distribution")";;
|
||||
zypper clean;;
|
||||
xbps)
|
||||
xbps-remove -O;;
|
||||
esac;;
|
||||
*Cd)
|
||||
Cd|-Cd)
|
||||
echo "$(gettext "Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY ADVANCED)")"
|
||||
case "$SO" in
|
||||
apt)
|
||||
apt autoremove --purge;;
|
||||
pacman)
|
||||
pacman -Rs $(pacman -Qdtq);;
|
||||
zypper)
|
||||
zypper --clean-deps;;
|
||||
xbps)
|
||||
xbps-remove -o;;
|
||||
*)
|
||||
echo "$(gettext "Not supported on your distribution")";;
|
||||
esac;;
|
||||
*S)
|
||||
S|-S)
|
||||
printf -- "$(gettext "Searching %s")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
@@ -257,8 +299,10 @@ case "$1" in
|
||||
pacman -Ss $packages;;
|
||||
apr | yum | dnf | zypper)
|
||||
$SO search $packages;;
|
||||
xbps)
|
||||
xbps-query $packages;;
|
||||
esac;;
|
||||
*F)
|
||||
F|-F)
|
||||
printf -- "$(gettext "Installing files: %s")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
@@ -268,16 +312,11 @@ case "$1" in
|
||||
pacman -U $packages;;
|
||||
yum | dnf | zypper)
|
||||
rpm -Uvh $packages;;
|
||||
xbps)
|
||||
echo "$(gettext "Not supported on your distribution")";;
|
||||
esac;;
|
||||
*)
|
||||
echo "$(gettext "Invalid option especified")"
|
||||
echo "$(gettext "Use apw -h for help")"
|
||||
exit;;
|
||||
esac
|
||||
|
||||
if [[ $SO = "pacman" ]];then
|
||||
case "$1" in
|
||||
*Rd)
|
||||
pacman -Rs $packages;;
|
||||
esac
|
||||
fi
|
||||
|
||||
30
jka-toolkit/gitd
Executable file
30
jka-toolkit/gitd
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/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
|
||||
;;
|
||||
esac
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-06-08 16:38+0200\n"
|
||||
"POT-Creation-Date: 2016-06-15 20:02+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"
|
||||
@@ -82,7 +82,7 @@ msgstr ""
|
||||
msgid "apw - A Packager Wrapper"
|
||||
msgstr ""
|
||||
|
||||
#: apw:39 apw:274
|
||||
#: apw:39 apw:320
|
||||
msgid "Use apw -h for help"
|
||||
msgstr ""
|
||||
|
||||
@@ -104,72 +104,72 @@ msgid ""
|
||||
"delete this file)"
|
||||
msgstr ""
|
||||
|
||||
#: apw:89
|
||||
#: apw:93
|
||||
msgid "No package specified, aborting"
|
||||
msgstr ""
|
||||
|
||||
#: apw:107
|
||||
#: apw:110
|
||||
msgid "Updating system"
|
||||
msgstr ""
|
||||
|
||||
#: apw:120
|
||||
#: apw:125
|
||||
msgid "Force updating system"
|
||||
msgstr ""
|
||||
|
||||
#: apw:127 apw:138
|
||||
#: apw:132 apw:135 apw:150
|
||||
msgid "Not supported on your distribution. Doing -U instead"
|
||||
msgstr ""
|
||||
|
||||
#: apw:142 apw:153
|
||||
#: apw:154 apw:167
|
||||
msgid "You are going to install %s and dependencies"
|
||||
msgstr ""
|
||||
|
||||
#: apw:161
|
||||
#: apw:179 apw:235
|
||||
msgid "Not supported on your distribution. Doing -I instead"
|
||||
msgstr ""
|
||||
|
||||
#: apw:165 apw:176
|
||||
#: apw:183 apw:197
|
||||
msgid "You are going to reinstall %s"
|
||||
msgstr ""
|
||||
|
||||
#: apw:183
|
||||
msgid "Not supported on your distribution. Doing -Ir instead"
|
||||
#: apw:193 apw:208
|
||||
msgid "Not supported on your distribution. Reconfiguring instead"
|
||||
msgstr ""
|
||||
|
||||
#: apw:187 apw:197
|
||||
#: apw:212 apw:224
|
||||
msgid "You are going to remove %s"
|
||||
msgstr ""
|
||||
|
||||
#: apw:204
|
||||
msgid "Not supported on your distribution. Doing -R instead"
|
||||
msgstr ""
|
||||
|
||||
#: apw:208 apw:217
|
||||
#: apw:239 apw:250
|
||||
msgid "Removing %s along with his dependencies that are not more in use"
|
||||
msgstr ""
|
||||
|
||||
#: apw:214 apw:223 apw:240 apw:250
|
||||
#: apw:247 apw:259 apw:292 apw:316
|
||||
msgid "Not supported on your distribution"
|
||||
msgstr ""
|
||||
|
||||
#: apw:226
|
||||
#: apw:256
|
||||
msgid "Not supported on your distribution. Doing -Rd instead"
|
||||
msgstr ""
|
||||
|
||||
#: apw:262
|
||||
msgid "Cleaning package manager"
|
||||
msgstr ""
|
||||
|
||||
#: apw:243
|
||||
#: apw:281
|
||||
msgid ""
|
||||
"Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY "
|
||||
"ADVANCED)"
|
||||
msgstr ""
|
||||
|
||||
#: apw:253
|
||||
#: apw:295
|
||||
msgid "Searching %s"
|
||||
msgstr ""
|
||||
|
||||
#: apw:262
|
||||
#: apw:306
|
||||
msgid "Installing files: %s"
|
||||
msgstr ""
|
||||
|
||||
#: apw:273
|
||||
#: apw:319
|
||||
msgid "Invalid option especified"
|
||||
msgstr ""
|
||||
|
||||
Binary file not shown.
@@ -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"
|
||||
msgstr "apw - A Package Wrapper"
|
||||
|
||||
#: apw:39 apw:274
|
||||
#: apw:39 apw:320
|
||||
msgid "Use apw -h for help"
|
||||
msgstr "Usa apw -h para ver la ayuda"
|
||||
|
||||
@@ -118,59 +118,59 @@ msgstr ""
|
||||
"(La respuesta será guardada en /etc/apw.conf, si quieres resetear apw borra "
|
||||
"el fichero)"
|
||||
|
||||
#: apw:89
|
||||
#: apw:93
|
||||
msgid "No package specified, aborting"
|
||||
msgstr "Ningún paquete especificado, cerrando"
|
||||
|
||||
#: apw:107
|
||||
#: apw:110
|
||||
msgid "Updating system"
|
||||
msgstr "Actualizando el sistema"
|
||||
|
||||
#: apw:120
|
||||
#: apw:125
|
||||
msgid "Force updating system"
|
||||
msgstr "Forzando la actualización del sistema"
|
||||
|
||||
#: apw:127 apw:138
|
||||
#: apw:132 apw:135 apw:150
|
||||
msgid "Not supported on your distribution. Doing -U instead"
|
||||
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"
|
||||
msgstr "Vas a instalar %s y sus dependencias"
|
||||
|
||||
#: apw:161
|
||||
#: 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:165 apw:176
|
||||
#: apw:183 apw:197
|
||||
msgid "You are going to reinstall %s"
|
||||
msgstr "Vas a reinstalar %s"
|
||||
|
||||
#: apw:183
|
||||
msgid "Not supported on your distribution. Doing -Ir instead"
|
||||
msgstr "No soportado en tu distribución. Usando -Ir en su lugar"
|
||||
#: apw:193 apw:208
|
||||
msgid "Not supported on your distribution. Reconfiguring instead"
|
||||
msgstr "No soportado en tu distribución. Reconfigurando en su lugar"
|
||||
|
||||
#: apw:187 apw:197
|
||||
#: apw:212 apw:224
|
||||
msgid "You are going to remove %s"
|
||||
msgstr "Vas a borrar %s"
|
||||
|
||||
#: apw:204
|
||||
msgid "Not supported on your distribution. Doing -R instead"
|
||||
msgstr "No soportado en tu distribución. Usando -R en su lugar"
|
||||
|
||||
#: apw:208 apw:217
|
||||
#: apw:239 apw:250
|
||||
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"
|
||||
|
||||
#: apw:214 apw:223 apw:240 apw:250
|
||||
#: apw:247 apw:259 apw:292 apw:316
|
||||
msgid "Not supported on your distribution"
|
||||
msgstr "No soportado en tu distribución"
|
||||
|
||||
#: apw:226
|
||||
#: 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"
|
||||
msgstr "Limpiando gestor de paquetes"
|
||||
|
||||
#: apw:243
|
||||
#: apw:281
|
||||
msgid ""
|
||||
"Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY "
|
||||
"ADVANCED)"
|
||||
@@ -178,14 +178,14 @@ msgstr ""
|
||||
"Limpiar el sistema de dependencias que no están en uso (CUIDADO, SOLO "
|
||||
"EXPERIMENTADOS)"
|
||||
|
||||
#: apw:253
|
||||
#: apw:295
|
||||
msgid "Searching %s"
|
||||
msgstr "Buscando %s"
|
||||
|
||||
#: apw:262
|
||||
#: apw:306
|
||||
msgid "Installing files: %s"
|
||||
msgstr "Instalando archivos: %s"
|
||||
|
||||
#: apw:273
|
||||
#: apw:319
|
||||
msgid "Invalid option especified"
|
||||
msgstr "Opción inválida seleccionada"
|
||||
|
||||
Reference in New Issue
Block a user