1
0
Fork 0

cleanup checkup script

This commit is contained in:
Luca Bilke 2024-01-04 12:45:57 +01:00
parent 6840a9e1f0
commit 7367d632ab

View file

@ -14,8 +14,8 @@ if command -v apt 1>/dev/null 2>&1; then
elif command -v xbps-install 1>/dev/null 2>&1; then
xbps-install -nuM 1>/tmp/xbps_updates 2>/tmp/xbps_errors
n="$(wc -l </tmp/xbps_updates)"
ne="$(grep broken /tmp/xbps_errors | wc -l)"
n="$(xbps-install -M -n -u | grep -Fe update -e install | wc -l)"
ne="$(grep -c broken /tmp/xbps_errors)"
n="$(xbps-install -M -n -u | grep -Fec update -e install)"
if [ "$n" != "0" ] && [ "$ne" != "0" ]; then
notify-send -u critical "Error downloading updates." "$(cut -d " " -f 1,5 /tmp/xbps_errors)"
elif [ "$n" -gt 1 ] && [ "$ne" = "0" ]; then