Files
dotfiles/bspwm/checkupdates.sh
2025-09-17 18:05:36 +03:00

20 lines
253 B
Bash
Executable File

#!/bin/bash
upd() {
checkupdates | wc -l > /tmp/checkupdates
}
if [[ ! -f /tmp/checkupdates ]]; then
upd
fi
count=$(cat /tmp/checkupdates)
status="$count updates"
if [[ $count -eq 0 ]]; then
status="Up to date"
fi
echo "$status"
upd & disown