mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-07-11 01:24:54 +02:00
version_check: fix formating of result output
This commit is contained in:
Vendored
+6
-3
@@ -119,7 +119,8 @@ echo -e "\n\nResult:\n"
|
|||||||
|
|
||||||
# Find the max length of the paths (before '->')
|
# Find the max length of the paths (before '->')
|
||||||
max_len=0
|
max_len=0
|
||||||
while IFS='->' read -r left _; do
|
while read -r line; do
|
||||||
|
left="${line%%->*}"
|
||||||
len=$(echo -n "$left" | wc -c)
|
len=$(echo -n "$left" | wc -c)
|
||||||
if (( len > max_len )); then
|
if (( len > max_len )); then
|
||||||
max_len=$len
|
max_len=$len
|
||||||
@@ -127,8 +128,10 @@ while IFS='->' read -r left _; do
|
|||||||
done < "$resultfile"
|
done < "$resultfile"
|
||||||
|
|
||||||
# Print with padding so '->' lines up
|
# Print with padding so '->' lines up
|
||||||
while IFS='->' read -r left right; do
|
while read -r line; do
|
||||||
right=$(echo "$right" | sed 's/^[[:space:]]*>*[[:space:]]*//')
|
left="${line%%->*}"
|
||||||
|
right="${line#*->}"
|
||||||
|
right=$(echo "$right" | sed 's/^[[:space:]]*//')
|
||||||
printf "%-${max_len}s -> %s\n" "$left" "$right"
|
printf "%-${max_len}s -> %s\n" "$left" "$right"
|
||||||
done < "$resultfile"
|
done < "$resultfile"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user