make-tags: script to generate a TAGS file in project root. The tags are acquired...
authorMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Thu, 6 Oct 2011 07:57:51 +0000 (09:57 +0200)
committerMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Thu, 6 Oct 2011 07:57:51 +0000 (09:57 +0200)
scripts/make-tags [new file with mode: 0755]

diff --git a/scripts/make-tags b/scripts/make-tags
new file mode 100755 (executable)
index 0000000..1eba155
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+ROOT=$(git rev-parse --show-toplevel)
+
+find $ROOT -name '*.py' | xargs etags -o ${ROOT}/TAGS
+if [ -n "$VIRTUAL_ENV" ]; then
+  find ${VIRTUAL_ENV}/lib -name '*.py' |xargs etags -a -o ${ROOT}/TAGS
+else
+    echo "No Virtual env enabled, will not add it to TAGS"
+fi
\ No newline at end of file