hyprland-dotfiles/scripts/updates.sh

27 lines
637 B
Bash
Raw Normal View History

2023-08-31 09:43:42 +00:00
#!/bin/sh
# _ _ _ _
# | | | |_ __ __| | __ _| |_ ___ ___
# | | | | '_ \ / _` |/ _` | __/ _ \/ __|
# | |_| | |_) | (_| | (_| | || __/\__ \
# \___/| .__/ \__,_|\__,_|\__\___||___/
# |_|
#
# by Stephan Raabe (2023)
# -----------------------------------------------------
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0
fi
if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
updates_aur=0
fi
updates=$(("$updates_arch" + "$updates_aur"))
if [ "$updates" -gt 0 ]; then
echo " $updates"
else
2023-08-31 12:10:16 +00:00
echo " 0"
2023-08-31 09:43:42 +00:00
fi