Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[git] improved hooks for tags generation

  • Loading branch information...
commit 81f43b35f72809fe01b587870df9e4760b098de4 1 parent a94edf5
@sickill authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 .git.template/hooks/ctags
View
7 .git.template/hooks/ctags
@@ -1,3 +1,6 @@
#!/bin/sh
-rm -f .git/tags
-ctags --tag-relative -Rf.git/tags --exclude=.git --languages=-javascript,sql
+set -e
+PATH="/usr/local/bin:$PATH"
+trap "rm -f .git/tags.$$" EXIT
+ctags --tag-relative -Rf.git/tags.$$ --exclude=.git --languages=-javascript,sql
+mv .git/tags.$$ .git/tags
Please sign in to comment.
Something went wrong with that request. Please try again.