buildgcc: Add 'nocolor' option to remove color codes from output

When writing to a logfile, the color codes just make things confusing.
The --nocolor option will allow these to not be printed.

Change-Id: I67645aac20b420ac83b828e77e0e50aab88d3d47
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13866
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Martin Roth 2016-03-01 15:21:07 -07:00 committed by Stefan Reinauer
parent 9b1936dc82
commit 4a53db06ec
1 changed files with 3 additions and 0 deletions

View File

@ -315,6 +315,7 @@ myhelp()
printf " [-c|--clean] remove temporary files before build\n"
printf " [-t|--savetemps] don't remove temporary files after build\n"
printf " [-y|--ccache] Use ccache when building cross compiler\n"
printf " [--nocolor] don't print color codes in output\n"
printf " [-j|--jobs <num>] run <num> jobs in parallel in make\n"
printf " [-s]--supported <tool> print supported version of a tool"
printf " [-d|--directory <target dir>] target directory to install cross compiler to\n"
@ -589,6 +590,8 @@ while true ; do
-S|--scripting) shift; SKIPPYTHON=0;;
-y|--ccache) shift; USECCACHE=1;;
-s|--supported) shift; PRINTSTABLE="$1"; shift;;
--nocolor) shift; \
unset red RED green GREEN blue BLUE cyan CYAN NC;;
--) shift; break;;
-*) printf "Invalid option\n\n"; myhelp; exit 1;;
*) break;;