mirror of
https://gitlab.com/JKANetwork/jka-toolkit.git
synced 2026-06-16 21:26:21 +02:00
apw 1.6 , delete old PKGBUILD
This commit is contained in:
+47
-6
@@ -12,18 +12,19 @@ shopt -s nocasematch
|
||||
#Basic info echo
|
||||
case "$1" in
|
||||
*h)
|
||||
echo "apw - A Packager Wrapper, a Idea from JKA Network, version 1.5"
|
||||
echo "apw - A Packager Wrapper, a Idea from JKA Network, version 1.6"
|
||||
echo " Usage: apw <option> [packages]"
|
||||
echo " {-h | h} Show this help"
|
||||
echo " {-U | U} Update system"
|
||||
echo " {-I | I} Install packages (Updates system also for preventing problems)"
|
||||
echo " {-Ir | Ir} Reinstall packages (Updates system also for preventing problems)"
|
||||
echo " {-R | R} Removes a package"
|
||||
echo " {-Rd | Rd} Removes a package along with dependencies that are not more in use (Only for Arch)"
|
||||
echo " {-C | C} Clean temp files"
|
||||
echo " {-Cd | Cd} Clean system from dependencies that are not in use (ADVANCED, BE CAREFUL!)"
|
||||
echo " {-S | S} Search in package database"
|
||||
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"
|
||||
echo " Append y to -U or -I (-Uy -Iy -Iry) for autoconfirm the operations"
|
||||
exit
|
||||
;;
|
||||
"")
|
||||
@@ -120,7 +121,7 @@ case "$1" in
|
||||
apt)
|
||||
apt update && apt install $packages;;
|
||||
pacman)
|
||||
pacman -Syu $packages;;
|
||||
pacman -Syu $packages --needed;;
|
||||
yum | dnf | zypper)
|
||||
$SO install $packages;;
|
||||
esac;;
|
||||
@@ -129,11 +130,32 @@ case "$1" in
|
||||
case "$SO" in
|
||||
apt)
|
||||
apt update && apt -y install $packages;;
|
||||
pacman)
|
||||
pacman -Syu $packages --noconfirm --needed;;
|
||||
yum | dnf | zypper)
|
||||
echo "Not supported, I don't know the command. Doing a -I instead"
|
||||
$SO install $packages;;
|
||||
esac;;
|
||||
*Ir)
|
||||
echo "You are going to reinstall $packages"
|
||||
case "$SO" in
|
||||
apt)
|
||||
apt update && apt install --reinstall $packages;;
|
||||
pacman)
|
||||
pacman -Syu $packages;;
|
||||
yum | dnf | zypper)
|
||||
$SO reinstall $packages;;
|
||||
esac;;
|
||||
*Iry)
|
||||
echo "You are going to reinstall $packages"
|
||||
case "$SO" in
|
||||
apt)
|
||||
apt update && apt -y install --reinstall $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;;
|
||||
echo "Not supported, I don't know the command. Doing a -Ir instead"
|
||||
$SO reinstall $packages;;
|
||||
esac;;
|
||||
*R)
|
||||
echo "You are going to remove $packages"
|
||||
@@ -145,6 +167,17 @@ case "$1" in
|
||||
yum | dnf | zypper)
|
||||
$SO remove $packages;;
|
||||
esac;;
|
||||
*Ry)
|
||||
echo "You are going to remove $packages"
|
||||
case "$SO" in
|
||||
apt)
|
||||
apt -y remove $packages;;
|
||||
pacman)
|
||||
pacman -R $packages --noconfirm;;
|
||||
yum | dnf | zypper)
|
||||
echo "Not supported, I don't know the command. Doing a -R instead"
|
||||
$SO remove $packages;;
|
||||
esac;;
|
||||
*Rd)
|
||||
echo "Removing $packages along with his dependencies that are not more in use"
|
||||
case "$SO" in
|
||||
@@ -153,6 +186,14 @@ case "$1" in
|
||||
*)
|
||||
echo "I don't know how to do this option in this packager";;
|
||||
esac;;
|
||||
*Rdy)
|
||||
echo "Removing $packages along with his dependencies that are not more in use"
|
||||
case "$SO" in
|
||||
pacman)
|
||||
pacman -Rs $packages --noconfirm;;
|
||||
*)
|
||||
echo "I don't know how to do this option in this packager";;
|
||||
esac;;
|
||||
*C)
|
||||
echo "Cleaning package manager"
|
||||
case "$SO" in
|
||||
@@ -168,7 +209,7 @@ case "$1" in
|
||||
dnf)
|
||||
dnf clean all --enablerepo=\*;;
|
||||
zypper)
|
||||
echo "I doesn't know this option in Zypper";;
|
||||
echo "I don't know this option in Zypper";;
|
||||
esac;;
|
||||
*Cd)
|
||||
echo "Cleaning system from dependencies that are not in use (BE CAREFUL, ONLY ADVANCED)"
|
||||
|
||||
Reference in New Issue
Block a user