void-updater.sh: recount updates every loop without needing root

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 14:59:00 -04:00
co-authored by Claude Opus 5.5
parent 8e6ea3ad38
commit 8ea48e0817
+3 -3
View File
@@ -1,14 +1,14 @@
#!/bin/bash #!/bin/bash
nohup xbps-install -S
n=`xbps-install -Snu | wc -l`
while true;do while true;do
n=$(xbps-install -Mnu 2>/dev/null | wc -l)
if [ $n -gt 0 ];then if [ $n -gt 0 ];then
#zenity --info --title="Update Notifier - (${n})" --text="There are currently ${n} system updates available!" #zenity --info --title="Update Notifier - (${n})" --text="There are currently ${n} system updates available!"
notify-send "There are ${n} system updates available" notify-send "There are ${n} system updates available"
echo "There are currently "${n}" updates available!" echo "There are currently ${n} updates available!"
fi fi