#! /bin/sh

rm -f TAGS
filter='\.cpp$\|\.cc$\|\.c$\|\.h$\|sql_yacc\.yy$\|\.hpp$\|\.ic$\|errmsg-utf8\.txt$'

list="find . -type f"
git rev-parse >/dev/null 2>/dev/null && list="git ls-files"

$list |grep $filter | xargs etags -o TAGS --append
