1
0
Fork 0

fix checkup script

This commit is contained in:
Luca Bilke 2024-01-22 07:33:58 +01:00
parent 55721f1701
commit 0ad325e5d7
2 changed files with 3 additions and 3 deletions

View File

@ -1,10 +1,10 @@
#!/bin/sh
askupgrade() {
[ "$(notify-send -c updates --action=Yes=Yes --action=No=No " Repository Sync" "Updates available. Update now?")" = 'Yes' ] && $TERMINAL -e upgrades
[ "$(notify-send -c updates --action=Yes=Yes --action=No=No " Repository Sync" "Updates available. Update now?")" = 'Yes' ] && $TERMINAL -e upgrades
}
xbps-install -nuM 1>/tmp/xbps_updates 2>/tmp/xbps_errors
\xbps-install -Sun 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

View File

@ -6,4 +6,4 @@ icon=""
num="$(\xbps-install -Sun | grep -c "update")"
[ "$num" -gt 0 ] && printf "%b" "$big$icon$reset $num\n"
exit
exit 0