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

Support Void Linux

This commit is contained in:
kprkpr
2016-06-15 20:05:58 +02:00
parent 10435fd96d
commit 9e80d8ecd9
4 changed files with 98 additions and 33 deletions

View File

@@ -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,7 +10,7 @@
export TEXTDOMAIN='apw'
export TEXTDOMAINDIR='/usr/share/locale'
#Version variable
version="1.8"
version="1.9"
#This option is for make if case insensitive
shopt -s nocasematch
@@ -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
@@ -114,6 +118,8 @@ case "$1" in
pacman -Syu $packages;;
yum | dnf | zypper)
$SO update;;
xbps)
xbps-install -Su;;
esac;;
Uf|-Uf)
echo $(gettext "Force updating system")
@@ -125,6 +131,9 @@ 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)
echo $updating
@@ -137,6 +146,9 @@ case "$1" in
$SO -y update;;
zypper)
$SO --non-interactive update;;
xbps)
echo "$(gettext "Not supported on your distribution. Doing -U instead")"
xbps-install -Su;;
esac;;
I|-I)
printf -- "$(gettext "You are going to install %s and dependencies")" "$packages"
@@ -148,6 +160,8 @@ case "$1" in
pacman -Syu $packages --needed;;
yum | dnf | zypper)
$SO install $packages;;
xbps)
xbps-install -S $packages;;
esac;;
Iy|-Iy)
printf -- "$(gettext "You are going to install %s and dependencies")" "$packages"
@@ -161,6 +175,9 @@ case "$1" in
$SO -y install $packages;;
zypper)
$SO --non-interactive install $packages;;
xbps)
echo "$(gettext "Not supported on your distribution. Doing -I instead")"
xbps-install -S $packages;;
esac;;
Ir|-Ir)
printf -- "$(gettext "You are going to reinstall %s")" "$packages"
@@ -172,6 +189,9 @@ 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)
printf -- "$(gettext "You are going to reinstall %s")" "$packages"
@@ -184,6 +204,9 @@ case "$1" in
$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)
printf -- "$(gettext "You are going to remove %s")" "$packages"
@@ -194,6 +217,8 @@ case "$1" in
pacman -R $packages;;
yum | dnf | zypper)
$SO remove $packages;;
xbps)
xbps-remove $packages;;
esac;;
Ry|-Ry)
printf -- "$(gettext "You are going to remove %s")" "$packages"
@@ -206,6 +231,9 @@ case "$1" in
$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)
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
pacman)
pacman -Rs $packages;;
xbps)
xbps-remove -R $packages;;
*)
echo "$(gettext "Not supported on your distribution")";;
esac;;
@@ -222,6 +252,9 @@ case "$1" in
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;;
@@ -241,6 +274,8 @@ case "$1" in
dnf clean all --enablerepo=\*;;
zypper)
zypper clean;;
xbps)
xbps-remove -O;;
esac;;
Cd|-Cd)
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);;
zypper)
zypper --clean-deps;;
xbps)
xbps-remove -o;;
*)
echo "$(gettext "Not supported on your distribution")";;
esac;;
@@ -262,6 +299,8 @@ case "$1" in
pacman -Ss $packages;;
apr | yum | dnf | zypper)
$SO search $packages;;
xbps)
xbps-query $packages;;
esac;;
F|-F)
printf -- "$(gettext "Installing files: %s")" "$packages"
@@ -273,6 +312,8 @@ 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")"

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"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:279
#: apw:39 apw:320
msgid "Use apw -h for help"
msgstr ""
@@ -104,60 +104,72 @@ msgid ""
"delete this file)"
msgstr ""
#: apw:89
#: apw:93
msgid "No package specified, aborting"
msgstr ""
#: apw:106
#: apw:110
msgid "Updating system"
msgstr ""
#: apw:119
#: apw:125
msgid "Force updating system"
msgstr ""
#: apw:126
#: 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: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"
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"
msgstr ""
#: apw:211 apw:220
#: apw:239 apw:250
msgid "Removing %s along with his dependencies that are not more in use"
msgstr ""
#: apw:217 apw:226 apw:255
#: apw:247 apw:259 apw:292 apw:316
msgid "Not supported on your distribution"
msgstr ""
#: apw:229
#: apw:256
msgid "Not supported on your distribution. Doing -Rd instead"
msgstr ""
#: apw:262
msgid "Cleaning package manager"
msgstr ""
#: apw:246
#: apw:281
msgid ""
"Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY "
"ADVANCED)"
msgstr ""
#: apw:258
#: apw:295
msgid "Searching %s"
msgstr ""
#: apw:267
#: apw:306
msgid "Installing files: %s"
msgstr ""
#: apw:278
#: apw:319
msgid "Invalid option especified"
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"
msgstr "apw - A Package Wrapper"
#: apw:39 apw:279
#: apw:39 apw:320
msgid "Use apw -h for help"
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 "
"el fichero)"
#: apw:89
#: apw:93
msgid "No package specified, aborting"
msgstr "Ningún paquete especificado, cerrando"
#: apw:106
#: apw:110
msgid "Updating system"
msgstr "Actualizando el sistema"
#: apw:119
#: apw:125
msgid "Force updating system"
msgstr "Forzando la actualización del sistema"
#: apw:126
#: 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: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"
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"
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"
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"
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"
msgstr "Limpiando gestor de paquetes"
#: apw:246
#: apw:281
msgid ""
"Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY "
"ADVANCED)"
@@ -166,14 +178,14 @@ msgstr ""
"Limpiar el sistema de dependencias que no están en uso (CUIDADO, SOLO "
"EXPERIMENTADOS)"
#: apw:258
#: apw:295
msgid "Searching %s"
msgstr "Buscando %s"
#: apw:267
#: apw:306
msgid "Installing files: %s"
msgstr "Instalando archivos: %s"
#: apw:278
#: apw:319
msgid "Invalid option especified"
msgstr "Opción inválida seleccionada"