exemples/scripts: pacman.sh: display tags early

This commit is contained in:
novakne 2021-02-23 13:44:39 +01:00
parent 0f1c3548ae
commit 075ddf3f50
No known key found for this signature in database
GPG key ID: 327873BEC52A3176

View file

@ -37,6 +37,12 @@ _err() {
printf -- '%s\n' "[$(date +'%Y-%m-%d %H:%M:%S')]: $*" >&2 printf -- '%s\n' "[$(date +'%Y-%m-%d %H:%M:%S')]: $*" >&2
} }
# Display tags before yambar fetch the updates number
printf -- '%s\n' "pacman|int|0"
printf -- '%s\n' "aur|int|0"
printf -- '%s\n' "pkg|int|0"
printf -- '%s\n' ""
while true; do while true; do
# Change interval # Change interval
@ -53,6 +59,7 @@ while true; do
if ! hash "${aur_helper}" >/dev/null 2>&1; then if ! hash "${aur_helper}" >/dev/null 2>&1; then
_err "aur helper not found, change it in the script" _err "aur helper not found, change it in the script"
exit 1
else else
aur_num=$("${aur_helper}" -Qmu | wc -l) aur_num=$("${aur_helper}" -Qmu | wc -l)
fi fi
@ -71,4 +78,3 @@ done
unset -v interval aur_helper pacman_num aur_num pkg_num unset -v interval aur_helper pacman_num aur_num pkg_num
unset -f _err unset -f _err