From ff5d27dfce6a75cbff57a78cd99c384d2dfa850f Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Wed, 12 Aug 2015 21:07:51 +0200 Subject: [PATCH 1/2] Nifty little ctags update script --- bin/update-ctags | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 bin/update-ctags diff --git a/bin/update-ctags b/bin/update-ctags new file mode 100644 index 0000000..cddbe08 --- /dev/null +++ b/bin/update-ctags @@ -0,0 +1,16 @@ +#!/bin/bash +# http://blog.chmouel.com/2009/07/03/update-emacsvim-tags-with-inotify/ +# /home/youruser/workspace/myproject IN_CLOSE_WRITE /home/youruser/bin/update-ctags py $@ $@/$# + +ACCEPTED_EXTENSION="$(echo $1|sed 's/|/ /g')" +BASE_DIR=$2 +FILE_EXT=${3##*.} + +[[ -z ${FILE_EXT} ]] && exit + +processing= +for extension in $ACCEPTED_EXTENSION;do + [[ $extension == $FILE_EXT ]] && processing=true +done + +find ${BASE_DIR} ! -wholename './.git/*' -a ! -wholename './.svn/*' -a ! -name '*.pyc' -a ! -name '*~' -a ! -name '*#' -print0| xargs -0 etags -o ${BASE_DIR}/TAGS 2>/dev/null >/dev/null From e369c6b27d52cf8d47dfd6948beebf51c899d4ea Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Fri, 14 Aug 2015 16:00:09 +0200 Subject: [PATCH 2/2] Script should be executable --- bin/update-ctags | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bin/update-ctags diff --git a/bin/update-ctags b/bin/update-ctags old mode 100644 new mode 100755