Merge branch 'master' of unix.club.cc.cmu.edu:~cmccabe/git/pub/cmccabe-bin
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 11 Oct 2010 03:55:51 +0000 (20:55 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 11 Oct 2010 03:55:51 +0000 (20:55 -0700)
ccc
comake [new file with mode: 0755]

diff --git a/ccc b/ccc
index deae082..e1b8b2c 100755 (executable)
--- a/ccc
+++ b/ccc
@@ -9,6 +9,7 @@ find -noleaf \
 -name '*.c' -o \
 -name '*.java' -o \
 -name '*.h' -o \
+-name '*.cc' -o \
 -name '*.cpp' -o \
 -name '*.hpp' -o \
 -name '*.c++' -o \
diff --git a/comake b/comake
new file mode 100755 (executable)
index 0000000..6d570dd
--- /dev/null
+++ b/comake
@@ -0,0 +1,15 @@
+#!/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"
+
+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}/"
+exit ${PIPESTATUS[0]}