aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gentags19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/gentags b/bin/gentags
new file mode 100755
index 0000000..f0494f0
--- /dev/null
+++ b/bin/gentags
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+CSCOPE_DIR="$PWD/.cscope"
+
+if [ ! -d "$CSCOPE_DIR" ]; then
+mkdir "$CSCOPE_DIR"
+fi
+
+echo "finding files ..."
+ROOT=/home/nolln/root
+find $ROOT \
+ -path "$ROOT/sys/*.[chs]" -prune -o \
+ -path "$ROOT/include/*.h" > "$CSCOPE_DIR/files"
+
+echo "adding files to cscope db: $ROOT/cscope.db ..."
+cscope -b -i "$CSCOPE_DIR/files"
+
+CSCOPE_DB="$ROOT/cscope.out"
+echo "exported CSCOPE_DB to: '$CSCOPE_DB'"