From 3859048c4dd068a4e586eeb2a64304e5779c333b Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Mon, 25 Mar 2024 02:04:31 +0300 Subject: [PATCH] Util : Replace stdout echo with proper stderr newlines. --- module/common/bash/module/Util.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/module/common/bash/module/Util.sh b/module/common/bash/module/Util.sh index 4413a9e4..18e00402 100644 --- a/module/common/bash/module/Util.sh +++ b/module/common/bash/module/Util.sh @@ -47,19 +47,19 @@ function _iterate_targets() { fi # Add newline if not the last one. - [[ "${count}" = "${total}" ]] || echo + [[ "${count}" = "${total}" ]] || _info done # Show skipped. if [[ ${skipped} != 0 ]]; then - echo - echo -e "${color_byellow}Skipped: ${skipped}.${color_default}" + _warn + _warn "${color_byellow}Skipped: ${skipped}.${color_default}" fi # Show error. if [[ ${failed} != 0 ]]; then - [[ "${skipped}" = 0 ]] && echo - echo -e "${color_bred}Failed: ${failed}.${color_default}" + [[ "${skipped}" = 0 ]] && _error + _error "${color_bred}Failed: ${failed}.${color_default}" false fi } @@ -69,7 +69,7 @@ function _iterate_targets() { function _iterate_skip() { ((skipped++)) - [[ "${*}" != "" ]] && echo -e "${color_byellow}${*}${color_default}" + [[ "${*}" != "" ]] && _warn "${color_byellow}${*}${color_default}" } # Report an error.