dots-of-war/files/.config/polybar/polybar-scripts/updates-arch-combined.sh

18 lines
293 B
Bash
Raw Normal View History

#!/bin/sh
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0
fi
if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then
updates_aur=0
fi
updates=$(("$updates_arch" + "$updates_aur"))
if [ "$updates" -gt 0 ]; then
echo "# $updates"
else
echo ""
fi