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:
+3
-3
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user