Add ccc, a script that wraps cscope
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 15 Feb 2010 22:18:58 +0000 (14:18 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 15 Feb 2010 22:18:58 +0000 (14:18 -0800)
"ccc" is a script that runs the cscope program. It builds an index
before launching cscope, similar to how "cscope -R" would work.  Unlike
cscope -R, ccc can handle .java files and others.

ccc [new file with mode: 0755]

diff --git a/ccc b/ccc
new file mode 100755 (executable)
index 0000000..d15fcf6
--- /dev/null
+++ b/ccc
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+die() {
+       echo "$@"
+       exit 1
+}
+
+find -noleaf \
+-name '*.c' -o \
+-name '*.java' -o \
+-name '*.h' -o \
+-name '*.cpp' -o \
+-name '*.c++' \
+> cscope.files || die "find command failed"
+
+cscope -icscope.files