From 05769dddee249cdde218e0b08bcd17830571c94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Thu, 19 Jan 2017 11:34:49 +0100 Subject: [PATCH 1/3] dist/tools/ci: toolchain versions: Fix heading formatting --- dist/tools/ci/print_toolchain_versions.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/tools/ci/print_toolchain_versions.sh b/dist/tools/ci/print_toolchain_versions.sh index 9d39938dec30..f235463d4a6c 100755 --- a/dist/tools/ci/print_toolchain_versions.sh +++ b/dist/tools/ci/print_toolchain_versions.sh @@ -47,7 +47,8 @@ avr_libc_version() { printf "%s (%s)" "$(get_define "$cc" avr/version.h __AVR_LIBC_VERSION_STRING__)" "$(get_define "$cc" avr/version.h __AVR_LIBC_DATE_STRING__)" } -printf "Installed toolchain versions:\n" +printf "%s\n" "Installed toolchain versions" +printf "%s\n" "----------------------------" VER=$(gcc --version | head -n 1) if [ -n "$VER" ]; then printf "%20s: %s\n" "native gcc" "$VER" From 4b05722477a7fd19fd5fff623e9771404e6a7496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cenk=20G=C3=BCndo=C4=9Fan?= Date: Thu, 19 Jan 2017 14:00:22 +0100 Subject: [PATCH 2/3] dist/tools/ci: toolchain versions: fix output to show avr-libc --- dist/tools/ci/build_and_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/tools/ci/build_and_test.sh b/dist/tools/ci/build_and_test.sh index cfe7eccf0250..21fd0ad03e58 100755 --- a/dist/tools/ci/build_and_test.sh +++ b/dist/tools/ci/build_and_test.sh @@ -43,7 +43,7 @@ function run { OUT_LENGTH="$(echo -n $OUT | wc -c)" if (( "$OUT_LENGTH" > 0 )); then echo -e "Command output:\n" - (printf "%s" "$OUT" | while IFS= read -r line; do printf "\t%s\n" "$line"; done) + (echo "$OUT" | while IFS= read -r line; do printf "\t%s\n" "$line"; done) echo "" fi } From 78e207bc338879dfc87bf5dfb621fcda5677e782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Thu, 19 Jan 2017 14:13:26 +0100 Subject: [PATCH 3/3] dist/tools/ci: Fix command output formatting of last line --- dist/tools/ci/build_and_test.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dist/tools/ci/build_and_test.sh b/dist/tools/ci/build_and_test.sh index 21fd0ad03e58..5f3e6a210af9 100755 --- a/dist/tools/ci/build_and_test.sh +++ b/dist/tools/ci/build_and_test.sh @@ -40,10 +40,11 @@ function run { set_result $NEW_RESULT # Indent command output so that its easily discernable from the rest - OUT_LENGTH="$(echo -n $OUT | wc -c)" - if (( "$OUT_LENGTH" > 0 )); then - echo -e "Command output:\n" - (echo "$OUT" | while IFS= read -r line; do printf "\t%s\n" "$line"; done) + if [ -n "$OUT" ]; then + echo "Command output:" + echo "" + # Using printf to avoid problems if the command output begins with a - + (printf "%s\n" "$OUT" | while IFS= read -r line; do printf "\t%s\n" "$line"; done) echo "" fi }