diff options
Diffstat (limited to 'emacs.d/update-etags')
-rwxr-xr-x | emacs.d/update-etags | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/emacs.d/update-etags b/emacs.d/update-etags new file mode 100755 index 0000000..88cc4f4 --- /dev/null +++ b/emacs.d/update-etags @@ -0,0 +1,18 @@ +#!/bin/bash + +LANGUAGE=$1 +ACCEPTED_EXTENSION="$(echo $2|sed 's/|/ /g')" +BASE_DIR=$3 +FILE_EXT=${4##*.} + +echo "test1" | logger + +[[ -z ${FILE_EXT} ]] && exit + +processing= +for extension in $ACCEPTED_EXTENSION;do + [[ $extension == $FILE_EXT ]] && processing=true +done + +echo "test" | logger +find ${BASE_DIR} ! -wholename './.git/*' -a ! -wholename './.svn/*' -a ! -name '*.pyc' -a ! -name '*~' -a ! -name '*#' -a ! -name '*.o' -a ! -name '*.ppu' -print0 | xargs -0 etags -o ${BASE_DIR}/TAGS 2>/dev/null >/dev/null |