1
0
Fork 0

checkup: remove prompt

This commit is contained in:
Luca Bilke 2024-08-07 09:32:54 +02:00
parent ec34931d4a
commit 6d2d958847
Signed by: luca
GPG Key ID: F6E11C9BAA7C82F5
1 changed files with 2 additions and 6 deletions

View File

@ -2,15 +2,11 @@
pkill -RTMIN+1 dwmblocks
askupgrade() {
[ "$(notify-send -c updates --action=Yes=Yes --action=No=No " Repository Sync" "Updates available. Update now?")" = 'Yes' ] && $TERMCMD upgrades
}
\xbps-install -SMun 1>/tmp/xbps_updates 2>/tmp/xbps_errors
ne="$(grep -c broken /tmp/xbps_errors)"
n="$(grep -c -e update -e install /tmp/xbps_updates)"
if [ "$n" != "0" ] && [ "$ne" != "0" ]; then
notify-send -u critical "Error downloading updates." "$(cut -d " " -f 1,5 /tmp/xbps_errors)"
notify-send -c updates -u critical " Repository Sync" "Error downloading updates: $(cut -d " " -f 1,5 /tmp/xbps_errors)"
elif [ "$n" -gt 1 ] && [ "$ne" = "0" ]; then
askupgrade
notify-send -c updates " Repository Sync" "Updates available: $n"
fi