From 7e692c85859c2f0e4f90f0317f8d744f658544df Mon Sep 17 00:00:00 2001 From: merakor Date: Sat, 11 Apr 2020 19:56:20 +0000 Subject: kiss-outdated: fix printing empty version information FossilOrigin-Name: 45e90f7bd5c55e9128c89738f68ded2633742647a98c916ce5c951c3e52d41a9 --- contrib/kiss-outdated | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/kiss-outdated b/contrib/kiss-outdated index db2b421..d8d5559 100755 --- a/contrib/kiss-outdated +++ b/contrib/kiss-outdated @@ -4,6 +4,11 @@ old_IFS=$IFS +# Notify the user +printf '\033[1;33m-> \033[1;36mNOTE \033[m%s\n' \ + "Sometimes repology can reply with empty strings for a package" \ + "It is a good idea to double check the results." >&2 + # List via arguments or all installed packages. if [ "$1" ]; then set -- printf '%s\n' "$@" @@ -27,8 +32,11 @@ fi # Skip these. # shellcheck disable=2106 { - [ "${rep:--}" = - ] && continue - [ "$ver" = git ] && continue + # Sometimes rep becomes whitespace so the + # other check passes. + [ "$rep" ] || continue + [ "$rep" = - ] && continue + [ "$ver" = git ] && continue } # Split the comma separated list. -- cgit v1.2.3