added clean command

This commit is contained in:
Bryan Joshua Pedini 2024-06-10 06:59:23 +02:00
parent b1306a73b4
commit 2c209fd7a0

View File

@ -94,6 +94,12 @@ case "$command_args" in
su_needed=true su_needed=true
fi fi
;; ;;
"clean")
command_args="-Scc"
if [ "$command" = "pacman" ]; then
su_needed=true
fi
;;
*) *)
if [ "$more_arguments" = "true" ]; then if [ "$more_arguments" = "true" ]; then
echo "Invalid command: \"$command $command_args\"" echo "Invalid command: \"$command $command_args\""
@ -112,6 +118,7 @@ case "$command_args" in
echo " upgrade - pacman -Syu | upgrades your system" echo " upgrade - pacman -Syu | upgrades your system"
echo " remove - pacman -Rs | remove packages & dependencies" echo " remove - pacman -Rs | remove packages & dependencies"
echo " purge - pacman -Rns | remove packages, dependencies & conf" echo " purge - pacman -Rns | remove packages, dependencies & conf"
echo " clean - pacman -Scc | remove all package files & trash"
echo " config - /etc/pacman.conf | edits pacman configuration" echo " config - /etc/pacman.conf | edits pacman configuration"
exit 1 exit 1
fi fi