mirror of
https://gitlab.com/JKANetwork/jka-toolkit.git
synced 2026-02-16 10:01:33 +01:00
Merge branch 'hotfix' of gitlab.com:JKANetwork/jka-toolkit
This commit is contained in:
@@ -10,14 +10,14 @@
|
||||
export TEXTDOMAIN='apw'
|
||||
export TEXTDOMAINDIR='/usr/share/locale'
|
||||
#Version variable
|
||||
version="1.7.1"
|
||||
version="1.8"
|
||||
|
||||
#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]")"
|
||||
@@ -91,8 +91,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 +105,7 @@ fi
|
||||
#Command wrapper
|
||||
updating="$(gettext "Updating system")"
|
||||
case "$1" in
|
||||
*U)
|
||||
U|-U)
|
||||
echo $updating
|
||||
case "$SO" in
|
||||
apt)
|
||||
@@ -116,7 +115,7 @@ case "$1" in
|
||||
yum | dnf | zypper)
|
||||
$SO update;;
|
||||
esac;;
|
||||
*Uf)
|
||||
Uf|-Uf)
|
||||
echo $(gettext "Force updating system")
|
||||
case "$SO" in
|
||||
apt)
|
||||
@@ -127,18 +126,19 @@ case "$1" in
|
||||
echo "$(gettext "Not supported on your distribution. Doing -U instead")"
|
||||
$SO update;;
|
||||
esac;;
|
||||
*Uy)
|
||||
Uy|-Uy)
|
||||
echo $updating
|
||||
case "$SO" in
|
||||
apt)
|
||||
apt update && apt -y upgrade;;
|
||||
pacman)
|
||||
pacman -Syu $packages --noconfirm;;
|
||||
yum | dnf | zypper)
|
||||
echo "$(gettext "Not supported on your distribution. Doing -U instead")"
|
||||
$SO update;;
|
||||
yum | dnf)
|
||||
$SO -y update;;
|
||||
zypper)
|
||||
$SO --non-interactive update;;
|
||||
esac;;
|
||||
*I)
|
||||
I|-I)
|
||||
printf -- "$(gettext "You are going to install %s and dependencies")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
@@ -149,7 +149,7 @@ case "$1" in
|
||||
yum | dnf | zypper)
|
||||
$SO install $packages;;
|
||||
esac;;
|
||||
*Iy)
|
||||
Iy|-Iy)
|
||||
printf -- "$(gettext "You are going to install %s and dependencies")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
@@ -157,11 +157,12 @@ case "$1" in
|
||||
apt update && apt -y install $packages;;
|
||||
pacman)
|
||||
pacman -Syu $packages --noconfirm --needed;;
|
||||
yum | dnf | zypper)
|
||||
echo "$(gettext "Not supported on your distribution. Doing -I instead")"
|
||||
$SO install $packages;;
|
||||
yum | dnf)
|
||||
$SO -y install $packages;;
|
||||
zypper)
|
||||
$SO --non-interactive install $packages;;
|
||||
esac;;
|
||||
*Ir)
|
||||
Ir|-Ir)
|
||||
printf -- "$(gettext "You are going to reinstall %s")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
@@ -172,18 +173,19 @@ case "$1" in
|
||||
yum | dnf | zypper)
|
||||
$SO reinstall $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;;
|
||||
esac;;
|
||||
*R)
|
||||
R|-R)
|
||||
printf -- "$(gettext "You are going to remove %s")" "$packages"
|
||||
case "$SO" in
|
||||
apt)
|
||||
@@ -193,18 +195,19 @@ case "$1" in
|
||||
yum | dnf | zypper)
|
||||
$SO 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;;
|
||||
esac;;
|
||||
*Rd)
|
||||
Rd|-Rd)
|
||||
printf -- "$(gettext "Removing %s along with his dependencies that are not more in use")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
@@ -213,7 +216,7 @@ case "$1" in
|
||||
*)
|
||||
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
|
||||
@@ -222,7 +225,7 @@ case "$1" in
|
||||
*)
|
||||
echo "$(gettext "Not supported on your distribution")";;
|
||||
esac;;
|
||||
*C)
|
||||
C|-C)
|
||||
echo "$(gettext "Cleaning package manager")"
|
||||
case "$SO" in
|
||||
apt)
|
||||
@@ -237,19 +240,21 @@ case "$1" in
|
||||
dnf)
|
||||
dnf clean all --enablerepo=\*;;
|
||||
zypper)
|
||||
echo "$(gettext "Not supported on your distribution")";;
|
||||
zypper clean;;
|
||||
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;;
|
||||
*)
|
||||
echo "$(gettext "Not supported on your distribution")";;
|
||||
esac;;
|
||||
*S)
|
||||
S|-S)
|
||||
printf -- "$(gettext "Searching %s")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
@@ -258,7 +263,7 @@ case "$1" in
|
||||
apr | yum | dnf | zypper)
|
||||
$SO search $packages;;
|
||||
esac;;
|
||||
*F)
|
||||
F|-F)
|
||||
printf -- "$(gettext "Installing files: %s")" "$packages"
|
||||
echo
|
||||
case "$SO" in
|
||||
@@ -274,10 +279,3 @@ case "$1" in
|
||||
echo "$(gettext "Use apw -h for help")"
|
||||
exit;;
|
||||
esac
|
||||
|
||||
if [[ $SO = "pacman" ]];then
|
||||
case "$1" in
|
||||
*Rd)
|
||||
pacman -Rs $packages;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -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-10 23:59+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:279
|
||||
msgid "Use apw -h for help"
|
||||
msgstr ""
|
||||
|
||||
@@ -108,15 +108,15 @@ msgstr ""
|
||||
msgid "No package specified, aborting"
|
||||
msgstr ""
|
||||
|
||||
#: apw:107
|
||||
#: apw:106
|
||||
msgid "Updating system"
|
||||
msgstr ""
|
||||
|
||||
#: apw:120
|
||||
#: apw:119
|
||||
msgid "Force updating system"
|
||||
msgstr ""
|
||||
|
||||
#: apw:127 apw:138
|
||||
#: apw:126
|
||||
msgid "Not supported on your distribution. Doing -U instead"
|
||||
msgstr ""
|
||||
|
||||
@@ -124,52 +124,40 @@ msgstr ""
|
||||
msgid "You are going to install %s and dependencies"
|
||||
msgstr ""
|
||||
|
||||
#: apw:161
|
||||
msgid "Not supported on your distribution. Doing -I instead"
|
||||
msgstr ""
|
||||
|
||||
#: apw:165 apw:176
|
||||
#: apw:166 apw:177
|
||||
msgid "You are going to reinstall %s"
|
||||
msgstr ""
|
||||
|
||||
#: apw:183
|
||||
msgid "Not supported on your distribution. Doing -Ir instead"
|
||||
msgstr ""
|
||||
|
||||
#: apw:187 apw:197
|
||||
#: apw:189 apw:199
|
||||
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:211 apw:220
|
||||
msgid "Removing %s along with his dependencies that are not more in use"
|
||||
msgstr ""
|
||||
|
||||
#: apw:214 apw:223 apw:240 apw:250
|
||||
#: apw:217 apw:226 apw:255
|
||||
msgid "Not supported on your distribution"
|
||||
msgstr ""
|
||||
|
||||
#: apw:226
|
||||
#: apw:229
|
||||
msgid "Cleaning package manager"
|
||||
msgstr ""
|
||||
|
||||
#: apw:243
|
||||
#: apw:246
|
||||
msgid ""
|
||||
"Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY "
|
||||
"ADVANCED)"
|
||||
msgstr ""
|
||||
|
||||
#: apw:253
|
||||
#: apw:258
|
||||
msgid "Searching %s"
|
||||
msgstr ""
|
||||
|
||||
#: apw:262
|
||||
#: apw:267
|
||||
msgid "Installing files: %s"
|
||||
msgstr ""
|
||||
|
||||
#: apw:273
|
||||
#: apw:278
|
||||
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:279
|
||||
msgid "Use apw -h for help"
|
||||
msgstr "Usa apw -h para ver la ayuda"
|
||||
|
||||
@@ -122,15 +122,15 @@ msgstr ""
|
||||
msgid "No package specified, aborting"
|
||||
msgstr "Ningún paquete especificado, cerrando"
|
||||
|
||||
#: apw:107
|
||||
#: apw:106
|
||||
msgid "Updating system"
|
||||
msgstr "Actualizando el sistema"
|
||||
|
||||
#: apw:120
|
||||
#: apw:119
|
||||
msgid "Force updating system"
|
||||
msgstr "Forzando la actualización del sistema"
|
||||
|
||||
#: apw:127 apw:138
|
||||
#: apw:126
|
||||
msgid "Not supported on your distribution. Doing -U instead"
|
||||
msgstr "No soportado en tu distribución. Usando -U en su lugar"
|
||||
|
||||
@@ -138,39 +138,27 @@ msgstr "No soportado en tu distribución. Usando -U en su lugar"
|
||||
msgid "You are going to install %s and dependencies"
|
||||
msgstr "Vas a instalar %s y sus dependencias"
|
||||
|
||||
#: apw:161
|
||||
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:166 apw:177
|
||||
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:187 apw:197
|
||||
#: apw:189 apw:199
|
||||
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:211 apw:220
|
||||
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:217 apw:226 apw:255
|
||||
msgid "Not supported on your distribution"
|
||||
msgstr "No soportado en tu distribución"
|
||||
|
||||
#: apw:226
|
||||
#: apw:229
|
||||
msgid "Cleaning package manager"
|
||||
msgstr "Limpiando gestor de paquetes"
|
||||
|
||||
#: apw:243
|
||||
#: apw:246
|
||||
msgid ""
|
||||
"Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY "
|
||||
"ADVANCED)"
|
||||
@@ -178,14 +166,14 @@ msgstr ""
|
||||
"Limpiar el sistema de dependencias que no están en uso (CUIDADO, SOLO "
|
||||
"EXPERIMENTADOS)"
|
||||
|
||||
#: apw:253
|
||||
#: apw:258
|
||||
msgid "Searching %s"
|
||||
msgstr "Buscando %s"
|
||||
|
||||
#: apw:262
|
||||
#: apw:267
|
||||
msgid "Installing files: %s"
|
||||
msgstr "Instalando archivos: %s"
|
||||
|
||||
#: apw:273
|
||||
#: apw:278
|
||||
msgid "Invalid option especified"
|
||||
msgstr "Opción inválida seleccionada"
|
||||
|
||||
Reference in New Issue
Block a user