1#!/bin/sh 2 3# Copyright 2016 The Fuchsia Authors 4# Copyright (c) 2008 Travis Geiselbrecht 5# 6# Use of this source code is governed by a MIT-style 7# license that can be found in the LICENSE file or at 8# https://opensource.org/licenses/MIT 9 10if [ "$#" -lt 1 ]; then 11 FILES=`find . -type f -regex ".*\.[chS]\|.*\.cpp"` 12 echo running ctags 13 rm -f tags 14 echo $FILES | xargs ctags -a 15else 16 if [ ! -d build-$1 ]; then 17 echo "directory build-$1 does not exist" 18 exit 1 19 fi 20 echo running ctags on project $1 21 rm -f tags 22 ctags -L build-$1/srcfiles.txt 23 ctags -a --recurse -L build-$1/include_paths.txt 2> /dev/null 24fi 25