From b7e68b5dbd27837b4c1ca0a3b59b8b8fc9de0bcf Mon Sep 17 00:00:00 2001 From: Travis Geiselbrecht Date: Wed, 2 Dec 2015 18:34:01 -0800 Subject: [PATCH] [scripts][tagit] extend tagit script to only tag files for a particular project --- scripts/tagit | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/scripts/tagit b/scripts/tagit index bf11a1ec..513d117c 100755 --- a/scripts/tagit +++ b/scripts/tagit @@ -1,7 +1,17 @@ #!/bin/sh -FILES=`find . -type f -regex ".*\.[chS]\|.*\.cpp"` - -echo running ctags -exuberant-ctags $FILES - +if [ "$#" -lt 1 ]; then + FILES=`find . -type f -regex ".*\.[chS]\|.*\.cpp"` + echo running ctags + rm -f tags + echo $FILES | xargs ctags -a +else + if [ ! -d build-$1 ]; then + echo "directory build-$1 does not exist" + exit 1 + fi + echo running ctags on project $1 + rm -f tags + ctags -L build-$1/srcfiles.txt + ctags -a --recurse -L build-$1/include_paths.txt 2> /dev/null +fi