Skip to content

Commit

Permalink
Revise index-tags script (#742)
Browse files Browse the repository at this point in the history
* Revise index-tags script

- based what files are included in tag generation on the files managed
by git. Exclude files not managed by git

* Revert ctags command to recursively tag all files
  • Loading branch information
bmckeough-showcaseidx authored Feb 18, 2021
1 parent bba5b75 commit 6b25f5d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions libexec/index-tags
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@

set -e

trap "rm -f $GIT_DIR/tags.$$" EXIT
err_file=$GIT_DIR/ctags.err
if ctags --tag-relative -Rf$GIT_DIR/tags.$$ --exclude=.git "$@" 2>${err_file}; then
mv $GIT_DIR/tags.$$ $GIT_DIR/tags
dir="`git rev-parse --git-dir`"

trap "rm -f $dir/tags.$$" EXIT
err_file=$dir/ctags.err
if ctags --tag-relative -Rf$dir/tags.$$ --exclude=.git "$@" 2>${err_file}; then
mv $dir/tags.$$ $dir/tags
[ -e ${err_file} ] && rm -f ${err_file}
else
# Ignore STDERR unless `ctags` returned a non-zero exit code
Expand Down

0 comments on commit 6b25f5d

Please sign in to comment.