From bad15943017418d8e61772bc34269eae61ec4e04 Mon Sep 17 00:00:00 2001 From: Ismael Luceno Date: Sun, 26 Mar 2023 00:43:58 +0100 Subject: [PATCH] sightsee: Make test mode show all unique matches --- usr/lib/sorcery/cmd/sightsee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/lib/sorcery/cmd/sightsee b/usr/lib/sorcery/cmd/sightsee index 81e71f81..358ae2f7 100755 --- a/usr/lib/sorcery/cmd/sightsee +++ b/usr/lib/sorcery/cmd/sightsee @@ -8,7 +8,7 @@ upstream_rel_get() { $0 = substr($0, RSTART, RLENGTH) print V[1 in V] } - ' | sort -rV | sed q + ' | sort -urV } # Process options @@ -86,7 +86,7 @@ find "${paths[@]}" -name DETAILS -exec awk ' } ' {} + | while read spell cur_rel url regex; do - latest_rel=$(upstream_rel_get "$url" "$regex") || continue + latest_rel=$(upstream_rel_get "$url" "$regex" | sed q) || continue if [ "x$latest_rel" != "x$cur_rel" ]; then echo "$spell $latest_rel" elif [ -n "$verbose" ]; then -- 2.38.5