mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-04-25 12:29:46 -06:00
version_check: fix formating of result output
This commit is contained in:
parent
2b144101ab
commit
aff082e0c1
9
3rdparty/version_check.sh
vendored
9
3rdparty/version_check.sh
vendored
@ -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"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user