1
0
mirror of https://gitlab.com/JKANetwork/jka-toolkit.git synced 2026-02-21 20:33:48 +01:00
This commit is contained in:
kprkpr
2016-05-31 23:09:56 +02:00
parent ddd1cb74c9
commit 4766591a3a

View File

@@ -12,7 +12,7 @@ shopt -s nocasematch
#Basic info echo #Basic info echo
case "$1" in case "$1" in
*h) *h)
echo "apw - A Packager Wrapper, a Idea from JKA Network, version 1.4.1" echo "apw - A Packager Wrapper, a Idea from JKA Network, version 1.5"
echo " Usage: apw <option> [packages]" echo " Usage: apw <option> [packages]"
echo " {-h | h} Show this help" echo " {-h | h} Show this help"
echo " {-U | U} Update system" echo " {-U | U} Update system"
@@ -23,6 +23,7 @@ case "$1" in
echo " {-Cd | Cd} Clean system from dependencies that are not in use (ADVANCED, BE CAREFUL!)" echo " {-Cd | Cd} Clean system from dependencies that are not in use (ADVANCED, BE CAREFUL!)"
echo " {-S | S} Search in package database" echo " {-S | S} Search in package database"
echo " {-F | F} Install file (distro family dependent, e.g. .deb , .pkg.tar.xz,...)" echo " {-F | F} Install file (distro family dependent, e.g. .deb , .pkg.tar.xz,...)"
echo " Add y to -U or -I (-Uy -Iy) for autoconfirm the operations"
exit exit
;; ;;
"") "")
@@ -102,6 +103,17 @@ case "$1" in
yum | dnf | zypper) yum | dnf | zypper)
$SO update;; $SO update;;
esac;; esac;;
*Uy)
echo "Updating system"
case "$SO" in
apt)
apt update && apt -y upgrade;;
pacman)
pacman -Syu $packages --noconfirm;;
yum | dnf | zypper)
echo "Not supported, I didn't know the command. Doing a -U instead"
$SO update;;
esac;;
*I) *I)
echo "You are going to install $packages and dependencies" echo "You are going to install $packages and dependencies"
case "$SO" in case "$SO" in
@@ -112,6 +124,17 @@ case "$1" in
yum | dnf | zypper) yum | dnf | zypper)
$SO install $packages;; $SO install $packages;;
esac;; esac;;
*Iy)
echo "You are going to install $packages and dependencies"
case "$SO" in
apt)
apt update && apt -y install $packages;;
pacman)
pacman -Syu $packages --noconfirm;;
yum | dnf | zypper)
echo "Not supported, I didn't know the command. Doing a -I instead"
$SO install $packages;;
esac;;
*R) *R)
echo "You are going to remove $packages" echo "You are going to remove $packages"
case "$SO" in case "$SO" in