From: Colin Patrick McCabe Date: Tue, 28 Sep 2010 00:47:20 +0000 (-0700) Subject: Add make colorizer X-Git-Url: http://club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c315b462aa3ff86fe0991835ad762b6e65051b2;p=cmccabe-bin Add make colorizer --- diff --git a/comake b/comake new file mode 100755 index 0000000..6f13e12 --- /dev/null +++ b/comake @@ -0,0 +1,14 @@ +#!/bin/bash + +# Colors +_ESC="$(echo -en '\e')" +C_NULL="${_ESC}[00;00m" +C_RED="${_ESC}[31;01m" +C_GREEN="${_ESC}[32;01m" +C_YELLOW="${_ESC}[33;01m" +C_LIGHTBLUE="${_ESC}[36;01m" + +exec make "$@" 2>&1 | sed \ + -e "s/\(^make.*\)/${C_LIGHTBLUE}\1${C_NULL}/" \ + -e "s/\(.* [Ee]rror:.*\)/${C_RED}\1${C_NULL}/" \ + -e "s/\(.* [Ww]arning:.*\)/${C_YELLOW}\1${C_NULL}/"