configs/arch-config/scripts/updates-pacman-aurhelper.sh

25 lines
663 B
Bash
Raw Normal View History

2021-01-30 14:06:01 +01:00
#!/bin/sh
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0
fi
# if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then
if ! updates_aur=$(paru -Qum 2> /dev/null | wc -l); then
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then
# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then
updates_aur=0
fi
updates=$(("$updates_arch" + "$updates_aur"))
if [ "$updates" -gt 0 ]; then
2021-01-30 14:16:52 +01:00
echo "$updates"
2021-02-18 21:09:11 +01:00
elif [ "$updates" -eq 0 ]; then
2021-02-18 21:08:32 +01:00
echo "$updates"
2021-01-30 14:06:01 +01:00
else
echo ""
fi