dotfiles/.bin/dev-here

30 lines
664 B
Plaintext
Raw Normal View History

2022-12-05 22:26:33 +01:00
#!/bin/sh
. ~/.bin/_config
set -xe
# save dev bookmark
DEVDIR="${PWD}"
echo "${DEVDIR}" > "${DEVDIRPATH}/dir"
# create files list
find "${DEVDIR}" -type f \
\( -name "*.c" \
-o -name "*.cc" \
-o -name "*.cpp" \
-o -name "*.c" \
-o -name "*.h" \
-o -name "*.hh" \
-o -name "*.hpp" \
\) > ${DEVDIRPATH}/files
# create cscope database
cscope -qbkCRvf ${DEVDIRPATH}/cscope.out -i${DEVDIRPATH}/files
# create tags file
2023-04-13 08:10:34 +02:00
uctags --sort=yes \
2022-12-05 22:26:33 +01:00
--fields=afiksSt \
2023-04-13 08:10:34 +02:00
--extras=fq \
2022-12-05 22:26:33 +01:00
--totals=yes \
-L ${DEVDIRPATH}/files \
-f ${DEVDIRPATH}/tags