From 4a53db06ecd7a39a1839adc9fe5ad72a62a4dc1e Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Tue, 1 Mar 2016 15:21:07 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/13866 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/crossgcc/buildgcc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'util') 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 ] run jobs in parallel in make\n" printf " [-s]--supported print supported version of a tool" printf " [-d|--directory ] 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;; -- cgit v1.2.3