dotfiles/.config/polybar/scripts/arch-update-check.sh

18 lines
296 B
Bash
Raw Permalink Normal View History

2022-07-29 20:51:50 -05:00
#!/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"))
RED='\033[0;31m'
if [ "$updates" -gt 0 ]; then
echo "$updates"
fi