diff options
author | Martin Roth <martinroth@google.com> | 2016-03-01 15:21:07 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2016-03-02 18:57:10 +0100 |
commit | 4a53db06ecd7a39a1839adc9fe5ad72a62a4dc1e (patch) | |
tree | 6be1b7447533f0dc7c6aee8b8de46aed67c514f9 /util/crossgcc | |
parent | 9b1936dc829ef1c0fd32368ecbce432f1b05cffb (diff) | |
download | coreboot-4a53db06ecd7a39a1839adc9fe5ad72a62a4dc1e.tar.xz |
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>
Diffstat (limited to 'util/crossgcc')
-rwxr-xr-x | util/crossgcc/buildgcc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index e4a6d473ee..e0ef98148c 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -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;; |