Permalink
Browse files

Use parent directory for ctags name, when the current directory is "t…

…runk," to play nicely with SVN repos.
  • Loading branch information...
1 parent f254582 commit 724dc13495275515812dfb008c6c7d9c7f2926bf @matzko committed with Nov 28, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 ctags/generate-tags-index.sh
@@ -4,6 +4,16 @@ curdir=`pwd`
filedir="$1";
filebase=`basename "$1"`;
+# Use the repo's main directory name if the current directory is "trunk"
+if [ 'trunk' = $filebase ]
+ then
+ filebase=`dirname $1`;
+ filebase=`basename $filebase`;
+fi
+
+echo "Generating tags for $filedir as \"$filebase\".";
+echo "";
+
cd $filedir;
exec ctags-exuberant -f ~/.vim/ctags/mytags/$filebase \

0 comments on commit 724dc13

Please sign in to comment.