diff --git a/templates/bin/waybar-void-update-checker b/templates/bin/waybar-void-update-checker index 9ab6307..717f6f2 100755 --- a/templates/bin/waybar-void-update-checker +++ b/templates/bin/waybar-void-update-checker @@ -3,9 +3,9 @@ set -e info="$(xbps-install -Mun)" +[ -z $info ] && exit -PKG_COUNT="$(echo "$info" | wc -l)" -[ $PKG_COUNT -eq 0 ] && exit +PKG_COUNT="$(echo -n "$info" | wc -l)" DL_SIZE="$(echo "$info" | awk '{s+=$6}END{print s}' | numfmt --to=iec-i)B"