Colorize build success/failure message.

Change-Id: I8901689876e65f5b72050c40e1580f167e49c2b0
This commit is contained in:
Dan Albert 2014-11-08 22:41:52 -08:00
parent 652ff716b8
commit b59995d0cd
1 changed files with 13 additions and 5 deletions

View File

@ -1605,9 +1605,17 @@ function make()
local secs=$(($tdiff % 60)) local secs=$(($tdiff % 60))
echo echo
if [ $ret -eq 0 ] ; then if [ $ret -eq 0 ] ; then
echo -n -e "#### make completed successfully " if [ $(uname) != "Darwin" ]; then
echo -n -e "\e[0;32m#### make completed successfully "
else
echo -n -e "#### make completed successfully "
fi
else else
echo -n -e "#### make failed to build some targets " if [ $(uname) != "Darwin" ]; then
echo -n -e "\e[0;31m#### make failed to build some targets "
else
echo -n -e "#### make failed to build some targets "
fi
fi fi
if [ $hours -gt 0 ] ; then if [ $hours -gt 0 ] ; then
printf "(%02g:%02g:%02g (hh:mm:ss))" $hours $mins $secs printf "(%02g:%02g:%02g (hh:mm:ss))" $hours $mins $secs
@ -1616,13 +1624,13 @@ function make()
elif [ $secs -gt 0 ] ; then elif [ $secs -gt 0 ] ; then
printf "(%s seconds)" $secs printf "(%s seconds)" $secs
fi fi
echo -e " ####" if [ $(uname) != "Darwin" ]; then
echo -e " ####\e[00m"
fi
echo echo
return $ret return $ret
} }
if [ "x$SHELL" != "x/bin/bash" ]; then if [ "x$SHELL" != "x/bin/bash" ]; then
case `ps -o command -p $$` in case `ps -o command -p $$` in
*bash*) *bash*)