From 075ddf3f50731ca5e8d576e269a19389c2ea279d Mon Sep 17 00:00:00 2001 From: novakne Date: Tue, 23 Feb 2021 13:44:39 +0100 Subject: [PATCH] exemples/scripts: pacman.sh: display tags early --- examples/scripts/pacman.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/scripts/pacman.sh b/examples/scripts/pacman.sh index 53fddb6..a20fd6b 100755 --- a/examples/scripts/pacman.sh +++ b/examples/scripts/pacman.sh @@ -37,6 +37,12 @@ _err() { 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 # Change interval @@ -53,6 +59,7 @@ while true; do if ! hash "${aur_helper}" >/dev/null 2>&1; then _err "aur helper not found, change it in the script" + exit 1 else aur_num=$("${aur_helper}" -Qmu | wc -l) fi @@ -71,4 +78,3 @@ done unset -v interval aur_helper pacman_num aur_num pkg_num unset -f _err -