Unify update check script

master
Quentin Duchemin 2020-10-28 17:55:39 +01:00
parent 9b5312a7e5
commit b4d1eb03cd
Signed by: Chosto
GPG Key ID: 0547178FEEDE7D6B
2 changed files with 0 additions and 18 deletions

View File

@ -1,18 +0,0 @@
#!/bin/sh
# Seems like the network is not up yet when this script is launched
# for the first time, causing an error. So wait a bit
sleep 5
updates_arch=$(/usr/bin/checkupdates | wc -l)
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 "%{F#dd7777}%{F#ddd} $updates_arch | $updates_aur"
else
echo "%{F#77dd77}%{F#ddd} 0"
fi