1
0
mirror of https://gitlab.com/JKANetwork/jka-toolkit.git synced 2026-02-16 10:01:33 +01:00

New option -f

This commit is contained in:
kprkpr
2016-06-07 15:56:31 +02:00
parent 9671a75d73
commit 4dbaeeab11
4 changed files with 92 additions and 64 deletions

View File

@@ -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.6.2" version="1.7"
#This option is for make if case insensitive #This option is for make if case insensitive
shopt -s nocasematch shopt -s nocasematch
@@ -32,6 +32,7 @@ case "$1" in
echo "$(gettext " {-S | S} Search in package database")" echo "$(gettext " {-S | S} Search in package database")"
echo "$(gettext " {-F | F} Install file (distro family dependent, e.g. .deb , .pkg.tar.xz,...)")" echo "$(gettext " {-F | F} Install file (distro family dependent, e.g. .deb , .pkg.tar.xz,...)")"
echo "$(gettext " Append y to -U or -I (-Uy -Iy -Iry) for autoconfirm the operations")" echo "$(gettext " Append y to -U or -I (-Uy -Iy -Iry) for autoconfirm the operations")"
echo "$(gettext " Append f to -U (-Uf) to force system update and ignore errors"
exit exit
;; ;;
"") "")
@@ -116,6 +117,17 @@ case "$1" in
yum | dnf | zypper) yum | dnf | zypper)
$SO update;; $SO update;;
esac;; esac;;
*Uf)
echo $(gettext "Force updating system")
case "$SO" in
apt)
apt update && apt upgrade -f;;
pacman)
pacman -Syu $packages --force;;
yum | dnf | zypper)
echo "$(gettext "Not supported on your distribution. Doing -U instead")"
$SO update;;
esac;;
*Uy) *Uy)
echo $updating echo $updating
case "$SO" in case "$SO" in
@@ -124,7 +136,7 @@ case "$1" in
pacman) pacman)
pacman -Syu $packages --noconfirm;; pacman -Syu $packages --noconfirm;;
yum | dnf | zypper) yum | dnf | zypper)
echo "$(gettext "Not supported on your distribution. Use -U instead")" echo "$(gettext "Not supported on your distribution. Doing -U instead")"
$SO update;; $SO update;;
esac;; esac;;
*I) *I)
@@ -147,7 +159,7 @@ case "$1" in
pacman) pacman)
pacman -Syu $packages --noconfirm --needed;; pacman -Syu $packages --noconfirm --needed;;
yum | dnf | zypper) yum | dnf | zypper)
echo "$(gettext "Not supported on your distribution. Use -I instead")" echo "$(gettext "Not supported on your distribution. Doing -I instead")"
$SO install $packages;; $SO install $packages;;
esac;; esac;;
*Ir) *Ir)
@@ -162,14 +174,14 @@ case "$1" in
$SO reinstall $packages;; $SO reinstall $packages;;
esac;; esac;;
*Iry) *Iry)
echo "$(gettext "You are going to reinstall $packages")" printf -- "$(gettext "You are going to reinstall %s")" "$packages"
case "$SO" in case "$SO" in
apt) apt)
apt update && apt -y install --reinstall $packages;; apt update && apt -y install --reinstall $packages;;
pacman) pacman)
pacman -Syu $packages --noconfirm;; pacman -Syu $packages --noconfirm;;
yum | dnf | zypper) yum | dnf | zypper)
echo "$(gettext "Not supported on your distribution. Use -Ir instead")" echo "$(gettext "Not supported on your distribution. Doing -Ir instead")"
$SO reinstall $packages;; $SO reinstall $packages;;
esac;; esac;;
*R) *R)
@@ -190,7 +202,7 @@ case "$1" in
pacman) pacman)
pacman -R $packages --noconfirm;; pacman -R $packages --noconfirm;;
yum | dnf | zypper) yum | dnf | zypper)
echo "$(gettext "Not supported on your distribution. Use -R instead")" echo "$(gettext "Not supported on your distribution. Doing -R instead")"
$SO remove $packages;; $SO remove $packages;;
esac;; esac;;
*Rd) *Rd)

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-07 13:27+0200\n" "POT-Creation-Date: 2016-06-07 15:38+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"
@@ -78,94 +78,102 @@ msgstr ""
msgid "\tAppend y to -U or -I (-Uy -Iy -Iry) for autoconfirm the operations" msgid "\tAppend y to -U or -I (-Uy -Iy -Iry) for autoconfirm the operations"
msgstr "" msgstr ""
#: apw:38 #: apw:35
msgid "\tAppend f to -U (-Uf) to force system update and ignore errors"
msgstr ""
#: apw:39
msgid "apw - A Packager Wrapper" msgid "apw - A Packager Wrapper"
msgstr "" msgstr ""
#: apw:39 apw:263 #: apw:40 apw:275
msgid "Use apw -h for help" msgid "Use apw -h for help"
msgstr "" msgstr ""
#: apw:47 #: apw:48
msgid "apw has to run as root, please run as root/with sudo" msgid "apw has to run as root, please run as root/with sudo"
msgstr "" msgstr ""
#: apw:52 #: apw:53
msgid "It's the first run of the program, we need a thing before continue" msgid "It's the first run of the program, we need a thing before continue"
msgstr "" msgstr ""
#: apw:53 #: apw:54
msgid "What, or in what is based your Linux?" msgid "What, or in what is based your Linux?"
msgstr "" msgstr ""
#: apw:54 #: apw:55
msgid "" msgid ""
"(The answer will be recorded in /etc/apw.conf, if you want to reset apw, " "(The answer will be recorded in /etc/apw.conf, if you want to reset apw, "
"delete this file)" "delete this file)"
msgstr "" msgstr ""
#: apw:89 #: apw:90
msgid "No package specified, aborting" msgid "No package specified, aborting"
msgstr "" msgstr ""
#: apw:107 #: apw:108
msgid "Updating system" msgid "Updating system"
msgstr "" msgstr ""
#: apw:127 #: apw:121
msgid "Not supported on your distribution. Use -U instead" msgid "Force updating system"
msgstr "" msgstr ""
#: apw:131 apw:142 #: apw:128 apw:139
msgid "Not supported on your distribution. Doing -U instead"
msgstr ""
#: apw:143 apw:154
msgid "You are going to install %s and dependencies" msgid "You are going to install %s and dependencies"
msgstr "" msgstr ""
#: apw:150 #: apw:162
msgid "Not supported on your distribution. Use -I instead" msgid "Not supported on your distribution. Doing -I instead"
msgstr "" msgstr ""
#: apw:154 #: apw:166 apw:177
msgid "You are going to reinstall %s" msgid "You are going to reinstall %s"
msgstr "" msgstr ""
#: apw:172 #: apw:184
msgid "Not supported on your distribution. Use -Ir instead" msgid "Not supported on your distribution. Doing -Ir instead"
msgstr "" msgstr ""
#: apw:176 apw:186 #: apw:188 apw:198
msgid "You are going to remove %s" msgid "You are going to remove %s"
msgstr "" msgstr ""
#: apw:193 #: apw:205
msgid "Not supported on your distribution. Use -R instead" msgid "Not supported on your distribution. Doing -R instead"
msgstr "" msgstr ""
#: apw:197 apw:206 #: apw:209 apw:218
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:203 apw:212 apw:229 apw:239 #: apw:215 apw:224 apw:241 apw:251
msgid "Not supported on your distribution" msgid "Not supported on your distribution"
msgstr "" msgstr ""
#: apw:215 #: apw:227
msgid "Cleaning package manager" msgid "Cleaning package manager"
msgstr "" msgstr ""
#: apw:232 #: apw:244
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:242 #: apw:254
msgid "Searching %s" msgid "Searching %s"
msgstr "" msgstr ""
#: apw:251 #: apw:263
msgid "Installing files: %s" msgid "Installing files: %s"
msgstr "" msgstr ""
#: apw:262 #: apw:274
msgid "Invalid option especified" msgid "Invalid option especified"
msgstr "" msgstr ""

Binary file not shown.

View File

@@ -88,29 +88,33 @@ msgstr ""
msgid "\tAppend y to -U or -I (-Uy -Iy -Iry) for autoconfirm the operations" msgid "\tAppend y to -U or -I (-Uy -Iy -Iry) for autoconfirm the operations"
msgstr "\tAñadir y a -U o -I (-Uy -Iy -Iry) para autoconfirmar la operación" msgstr "\tAñadir y a -U o -I (-Uy -Iy -Iry) para autoconfirmar la operación"
#: apw:38 #: apw:35
msgid "\tAppend f to -U (-Uf) to force system update and ignore errors"
msgstr "\tAñadir f to -U (-Uf) para forzar la actualización del sistema e ignorar los errores"
#: apw:39
msgid "apw - A Packager Wrapper" msgid "apw - A Packager Wrapper"
msgstr "apw - A Package Wrapper" msgstr "apw - A Package Wrapper"
#: apw:39 apw:263 #: apw:40 apw:275
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"
#: apw:47 #: apw:48
msgid "apw has to run as root, please run as root/with sudo" msgid "apw has to run as root, please run as root/with sudo"
msgstr "apw tiene que ejecutarse como root, por favor usalo como root/sudo" msgstr "apw tiene que ejecutarse como root, por favor usalo como root/sudo"
#: apw:52 #: apw:53
msgid "It's the first run of the program, we need a thing before continue" msgid "It's the first run of the program, we need a thing before continue"
msgstr "" msgstr ""
"Esta es la primera ejecución del programa, necesitamos algo antes de " "Esta es la primera ejecución del programa, necesitamos algo antes de "
"continuar" "continuar"
#: apw:53 #: apw:54
msgid "What, or in what is based your Linux?" msgid "What, or in what is based your Linux?"
msgstr "¿Qué o en qué está basado tu distribución Linux?" msgstr "¿Qué o en qué está basado tu distribución Linux?"
#: apw:54 #: apw:55
msgid "" msgid ""
"(The answer will be recorded in /etc/apw.conf, if you want to reset apw, " "(The answer will be recorded in /etc/apw.conf, if you want to reset apw, "
"delete this file)" "delete this file)"
@@ -118,55 +122,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:90
msgid "No package specified, aborting" msgid "No package specified, aborting"
msgstr "Ningún paquete especificado, cerrando" msgstr "Ningún paquete especificado, cerrando"
#: apw:107 #: apw:108
msgid "Updating system" msgid "Updating system"
msgstr "Actualizando el sistema" msgstr "Actualizando el sistema"
#: apw:127 #: apw:121
msgid "Not supported on your distribution. Use -U instead" msgid "Force updating system"
msgstr "No soportado en tu distribución. Usa -U en su lugar" msgstr "Forzando la actualización del sistema"
#: apw:131 apw:142 #: apw:128 apw:139
msgid "Not supported on your distribution. Doing -U instead"
msgstr "No soportado en tu distribución. Usando -U en su lugar"
#: apw:143 apw:154
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:150 #: apw:162
msgid "Not supported on your distribution. Use -I instead" msgid "Not supported on your distribution. Doing -I instead"
msgstr "No soportado en tu distribución. Usa -I en su lugar" msgstr "No soportado en tu distribución. Usando -I en su lugar"
#: apw:154 #: apw:166 apw:177
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:172 #: apw:184
msgid "Not supported on your distribution. Use -Ir instead" msgid "Not supported on your distribution. Doing -Ir instead"
msgstr "No soportado en tu distribución. Usa -Ir en su lugar" msgstr "No soportado en tu distribución. Usando -Ir en su lugar"
#: apw:176 apw:186 #: apw:188 apw:198
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:193 #: apw:205
msgid "Not supported on your distribution. Use -R instead" msgid "Not supported on your distribution. Doing -R instead"
msgstr "No soportado en tu distribución. Usa -R en su lugar" msgstr "No soportado en tu distribución. Usando -R en su lugar"
#: apw:197 apw:206 #: apw:209 apw:218
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:203 apw:212 apw:229 apw:239 #: apw:215 apw:224 apw:241 apw:251
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:215 #: apw:227
msgid "Cleaning package manager" msgid "Cleaning package manager"
msgstr "Limpiar gestor de paquetes" msgstr "Limpiando gestor de paquetes"
#: apw:232 #: apw:244
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)"
@@ -174,14 +182,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:242 #: apw:254
msgid "Searching %s" msgid "Searching %s"
msgstr "Buscando %s" msgstr "Buscando %s"
#: apw:251 #: apw:263
msgid "Installing files: %s" msgid "Installing files: %s"
msgstr "Instalando archivos: %s" msgstr "Instalando archivos: %s"
#: apw:262 #: apw:274
msgid "Invalid option especified" msgid "Invalid option especified"
msgstr "Opción inválida seleccionada" msgstr "Opción inválida seleccionada"