Skip to content

Commit

Permalink
Merge pull request #6422 from gebart/pr/ci-tc-version-heading
Browse files Browse the repository at this point in the history
dist/tools/ci: toolchain versions: Fix heading formatting
  • Loading branch information
PeterKietzmann committed Jan 19, 2017
2 parents f119a2e + 78e207b commit 2a4df77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions dist/tools/ci/build_and_test.sh
Expand Up @@ -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"
(printf "%s" "$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
}
Expand Down
3 changes: 2 additions & 1 deletion dist/tools/ci/print_toolchain_versions.sh
Expand Up @@ -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"
Expand Down

0 comments on commit 2a4df77

Please sign in to comment.