From aff082e0c178cd6cbe600a04b2b802eb422f7741 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 18 Apr 2026 17:14:18 +0200 Subject: [PATCH] version_check: fix formating of result output --- 3rdparty/version_check.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/3rdparty/version_check.sh b/3rdparty/version_check.sh index e0632da3e7..7947a006c1 100644 --- a/3rdparty/version_check.sh +++ b/3rdparty/version_check.sh @@ -119,7 +119,8 @@ echo -e "\n\nResult:\n" # Find the max length of the paths (before '->') max_len=0 -while IFS='->' read -r left _; do +while read -r line; do + left="${line%%->*}" len=$(echo -n "$left" | wc -c) if (( len > max_len )); then max_len=$len @@ -127,8 +128,10 @@ while IFS='->' read -r left _; do done < "$resultfile" # Print with padding so '->' lines up -while IFS='->' read -r left right; do - right=$(echo "$right" | sed 's/^[[:space:]]*>*[[:space:]]*//') +while read -r line; do + left="${line%%->*}" + right="${line#*->}" + right=$(echo "$right" | sed 's/^[[:space:]]*//') printf "%-${max_len}s -> %s\n" "$left" "$right" done < "$resultfile"