Add cct, a ctags generation script
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 18 Oct 2010 18:32:04 +0000 (11:32 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 18 Oct 2010 18:33:46 +0000 (11:33 -0700)
cct [new file with mode: 0755]

diff --git a/cct b/cct
new file mode 100755 (executable)
index 0000000..8c28f0e
--- /dev/null
+++ b/cct
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+die() {
+        echo $@
+        exit 1
+}
+
+if ctags --version | grep -i exuberant ; then
+        :
+else
+        die "You should install exuberant-ctags. \
+The default ctags program often sucks big-time."
+fi
+
+rm -f tags || die "couldn't remove tags file"
+
+# Need vim 6.2 or higher
+# for the case-insensitive sorting (sort=folded)
+ctags -B --recurse \
+ --totals=yes \
+ --tag-relative=no \
+ --sort=fold \
+ --file-scope=yes \
+ -f tags .