1#!/bin/sh
2
3if [ "$#" -lt 1 ]; then
4    FILES=`find . -type f -regex ".*\.[chS]\|.*\.cpp"`
5    echo running ctags
6    rm -f tags
7    echo $FILES | xargs ctags -a
8else
9    if [ ! -d build-$1 ]; then
10        echo "directory build-$1 does not exist"
11        exit 1
12    fi
13    echo running ctags on project $1
14    rm -f tags
15    ctags -L build-$1/srcfiles.txt
16    ctags -a --recurse -L build-$1/include_paths.txt 2> /dev/null
17fi
18