diff options
author | a1346054 <36859588+a1346054@users.noreply.github.com> | 2022-09-03 02:03:47 +0300 |
---|---|---|
committer | a1346054 <36859588+a1346054@users.noreply.github.com> | 2022-09-03 02:28:04 +0300 |
commit | fcc151244513044f0e5192df25265a27897095a0 (patch) | |
tree | b9741ca58e67d68a8c01618636d9319282b77a9d | |
parent | 715b430bcd28d6aa38f32945f82353b3273b1213 (diff) |
avoid problem if path contains whitespace
-rwxr-xr-x | scripts/display_test_logs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/display_test_logs b/scripts/display_test_logs index d00e9c4..82b9f9f 100755 --- a/scripts/display_test_logs +++ b/scripts/display_test_logs @@ -3,14 +3,14 @@ # Display any logs in the tests folder # Move to the project root directory -if cd `dirname $0`/.. ; then +if cd "$(dirname "$0")/.."; then found= for f in tests/*.log; do - if [ -f $f ]; then + if [ -f "$f" ]; then echo - echo === $f === + echo "=== $f ===" echo - cat $f + cat "$f" found=1 fi done @@ -19,4 +19,4 @@ if cd `dirname $0`/.. ; then fi fi -exit $? +exit "$?" |