dot-files/polybar/scripts/check-all-updates.sh
Tobias Schneider c63c60a044
Add polybar config
Signed-off-by: Tobias Schneider <git@cynt4k.dev>
2024-11-01 00:26:39 +01:00

18 lines
318 B
Bash
Executable file

#!/bin/sh
# List all updates available from Yay (includes AUR)
# Sync package list first
yay -Sy > /dev/null
# Get list and count of updates
if ! updates=$((yay -Qum) | wc -l); then
updates=1
fi
# Print the available updates if more than 0
if [ "$updates" -gt 0 ]; then
echo "$updates"
else
echo ""
fi