From ead9a5c6c96c7bb30515b1f4d47d87a0a2949592 Mon Sep 17 00:00:00 2001 From: Roman Birg Date: Fri, 16 Oct 2015 10:29:06 -0700 Subject: fix success/failure coloring for darwin what's the point of OS X if it's not pretty Change-Id: I7a1ed0766adead46b46092acf826c6ef270edd10 Signed-off-by: Roman Birg --- envsetup.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'envsetup.sh') diff --git a/envsetup.sh b/envsetup.sh index 2f019f9..36b00b4 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -2302,9 +2302,9 @@ function pez { local retval=$? if [ $retval -ne 0 ] then - echo -e "\e[0;31mFAILURE\e[00m" + printf "\e[0;31mFAILURE\e[00m\n" else - echo -e "\e[0;32mSUCCESS\e[00m" + printf "\e[0;32mSUCCESS\e[00m\n" fi return $retval } @@ -2328,7 +2328,7 @@ function mk_timer() if [ -n "$ncolors" ] && [ $ncolors -ge 8 ]; then color_failed="\e[0;31m" color_success="\e[0;32m" - color_reset="\e[00m" + color_reset="\e[0m" else color_failed="" color_success="" @@ -2336,9 +2336,9 @@ function mk_timer() fi echo if [ $ret -eq 0 ] ; then - echo -n -e "${color_success}#### make completed successfully " + printf "${color_success}#### make completed successfully " else - echo -n -e "${color_failed}#### make failed to build some targets " + printf "${color_failed}#### make failed to build some targets " fi if [ $hours -gt 0 ] ; then printf "(%02g:%02g:%02g (hh:mm:ss))" $hours $mins $secs @@ -2347,8 +2347,7 @@ function mk_timer() elif [ $secs -gt 0 ] ; then printf "(%s seconds)" $secs fi - echo -e " ####${color_reset}" - echo + printf " ####${color_reset}\n\n" return $ret } -- cgit v1.1