From 9b6878b5d6658cdc04d57fe1d2d7419424caa6cd Mon Sep 17 00:00:00 2001 From: c0dev0id Date: Thu, 12 Sep 2024 08:24:54 +0200 Subject: [PATCH] Update 2024-09-12 08:24 OpenBSD/amd64-x13 --- .bin/maketags | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 .bin/maketags diff --git a/.bin/maketags b/.bin/maketags new file mode 100755 index 0000000..3f5a358 --- /dev/null +++ b/.bin/maketags @@ -0,0 +1,51 @@ +#!/bin/sh + +set -xe + +# create files list +find "${PWD}/"* -type f \ + \( -iname "*.c" \ + -o -iname "*.cc" \ + -o -iname "*.cpp" \ + -o -iname "*.c" \ + -o -iname "*.h" \ + -o -iname "*.hh" \ + -o -iname "*.hpp" \ + -o -iname "*.lua" \ + -o -iname "*.gmk" \ + -o -iname "*.pl" \ + -o -iname "*.sh" \ + -o -name "Makefile" \ + \) > ${PWD}/.git/files + +# include extra directories +if [ ! -z "$1" ] +then + find $@ -type f \ + \( -iname "*.c" \ + -o -iname "*.cc" \ + -o -iname "*.cpp" \ + -o -iname "*.c" \ + -o -iname "*.h" \ + -o -iname "*.hh" \ + -o -iname "*.hpp" \ + -o -iname "*.lua" \ + -o -iname "*.gmk" \ + -o -iname "*.pl" \ + -o -iname "*.sh" \ + -o -name "Makefile" \ + \) >> ${PWD}/.git/files +fi + +# create cscope database +cscope -qbkCRv -P${PWD} -f ${PWD}/.git/cscope.out -i${PWD}/.git/files + +# create tags file +ectags --sort=yes \ + --languages=C,C++,Make,Lua,Perl,Sh \ + --tag-relative=no \ + --extra=fq \ + --totals=yes \ + --exclude=.git \ + -L ${PWD}/.git/files \ + -f ${PWD}/.git/tags