1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-23 16:41:31 +00:00
Dotfiles/.config/polybar/polybar-scripts/updates-arch-combined/updates-arch-combined.sh
2020-07-27 07:59:00 +03:00

22 lines
546 B
Bash

#!/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
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then
# if ! updates_aur=$(rua upgrade --printonly 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