Arrange update menu

This commit is contained in:
MatMoul 2022-10-16 01:26:57 +02:00
parent d771889322
commit 1eb7570626

View file

@ -2,11 +2,6 @@
. ./lib
options=()
if [ ! -f /usr/bin/pacdiff ]; then
options+=("Install pacman-contrib" "")
options+=("" "")
fi
if [ -f /usr/bin/trizen ]; then
options+=("Upgrade with trizen" "trizen -Syu")
aurhelper=1
@ -20,13 +15,6 @@ if [ -f /usr/bin/aurman ]; then
aurhelper=1
fi
if [ ! "$aurhelper" = "1" ]; then
options+=("Install trizen" "")
options+=("Install yay" "")
options+=("Install aurman" "")
options+=("Install yaourt" "(End of life)")
options+=("" "")
fi
options+=("Upgrade" "pacman -Syu")
options+=("Clean orphan" "pacman -Rns \$(pacman -Qqtd)")
options+=("Clean cache" "pacman -Sc")
@ -42,16 +30,6 @@ if [ -f /var/lib/pacman/db.lck ]; then
options+=("Remove db.lck" "rm /var/lib/pacman/db.lck")
options+=("" "")
fi
if [ "$aurhelper" = "1" ]; then
if [ ! -f /usr/bin/downgrade ]; then
options+=("Install downgrade" "")
fi
if [ ! -f /usr/bin/pkgstats ]; then
options+=("Install pkgstats" "")
fi
if [ ! -f /usr/bin/aurvote ]; then
options+=("Install aurvote" "(AUR)")
fi
if [ ! -f /usr/bin/trizen ]; then
options+=("Install trizen" "")
fi
@ -61,6 +39,22 @@ if [ "$aurhelper" = "1" ]; then
if [ ! -f /usr/bin/aurman ]; then
options+=("Install aurman" "")
fi
options+=("" "")
if [ ! -f /usr/bin/pacdiff ]; then
options+=("Install pacman-contrib" "")
options+=("" "")
fi
if [ "$aurhelper" = "1" ]; then
if [ ! -f /usr/bin/pkgstats ]; then
options+=("Install pkgstats" "")
fi
if [ ! -f /usr/bin/aurvote ]; then
options+=("Install aurvote" "(AUR)")
fi
if [ ! -f /usr/bin/downgrade ]; then
options+=("" "")
options+=("Install downgrade" "")
fi
fi
sel=$(whiptail --backtitle "$apptitle" --title "Updates Menu :" --menu "" --cancel-button "Back" 0 0 0 \