This commit is contained in:
Stephan Raabe
2023-02-24 11:05:07 +01:00
parent 79eff7ef55
commit 6c20fdbf8f
4 changed files with 38 additions and 11 deletions

19
scripts/checkupdates.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
format() {
if [ "$1" -eq 0 ]; then
echo '-'
else
echo "$1"
fi
}
if ! updates_arch="$(checkupdates | wc -l)"; then
updates_arch=0
fi
if ! updates_aur="$(yay -Qum 2>/dev/null | wc -l)"; then
updates_aur=0
fi
echo "($(format $updates_arch)/$(format $updates_aur))"