From b766584b710afcbcd036218da73de0cd3a0e01b4 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 9 May 2020 21:28:09 +0300 Subject: [PATCH] kiss-outdated: Minor tweaks --- contrib/kiss-outdated | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/contrib/kiss-outdated b/contrib/kiss-outdated index 29dc473..6fd110a 100755 --- a/contrib/kiss-outdated +++ b/contrib/kiss-outdated @@ -1,8 +1,11 @@ #!/bin/sh # Check repository packages for updates +# +# Intended behavior. +# shellcheck disable=2106 kiss s "${@:-*}" | (while read -r pkg_loc _; do { - read -r ver _ 2>/dev/null < "$pkg_loc/version" + read -r ver _ 2>/dev/null < "$pkg_loc/version" || continue pkg=${pkg_loc##*/} @@ -11,7 +14,7 @@ kiss s "${@:-*}" | (while read -r pkg_loc _; do { *-bin) fix=${pkg%%-bin} ;; *[0-9]r) fix=${pkg%%r} ;; esac - + # Ignore duplicates. # shellcheck disable=2106 case $seen in @@ -25,16 +28,16 @@ kiss s "${@:-*}" | (while read -r pkg_loc _; do { rep=${rep##*>} # Skip these. - # shellcheck disable=2106 { case $rep in -|''|' ') continue; esac case $ver in git) continue; esac } # Split the comma separated list. + # Intentional (and safe) splitting. # shellcheck disable=2086 { - IFS=', ' + IFS=', ' set -f set +f -- $rep unset IFS