aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-05-01 16:26:24 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-05-01 16:26:24 -0700
commit6b739739968a0cc9b4d9909d8f4ffec30f4461dd (patch)
treebd30b31896b3c52292898bde404ce5dcbf76b04e /bin
parent5355432d71cb1e3347b73536ce5be4af1aefcadc (diff)
moved to static build with musl and integrated cscopes into dev tools
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'"