From e146e947c52ac4adbe426b3f893faff1e46ed5f8 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 19 Apr 2016 15:24:25 +0100 Subject: Use GNU stow for dotfiles management --- git/.git_template/hooks/ctags | 8 ++++++++ git/.git_template/hooks/post-checkout | 2 ++ git/.git_template/hooks/post-commit | 2 ++ git/.git_template/hooks/post-merge | 2 ++ git/.git_template/hooks/post-rewrite | 4 ++++ 5 files changed, 18 insertions(+) create mode 100755 git/.git_template/hooks/ctags create mode 100755 git/.git_template/hooks/post-checkout create mode 100755 git/.git_template/hooks/post-commit create mode 100755 git/.git_template/hooks/post-merge create mode 100755 git/.git_template/hooks/post-rewrite (limited to 'git/.git_template/hooks') diff --git a/git/.git_template/hooks/ctags b/git/.git_template/hooks/ctags new file mode 100755 index 0000000..a9a2150 --- /dev/null +++ b/git/.git_template/hooks/ctags @@ -0,0 +1,8 @@ +#!/bin/sh +set -e +PATH="/usr/local/bin:$PATH" +dir="`git rev-parse --git-dir`" +trap 'rm -f "$dir/$$.tags"' EXIT +git ls-files | ctags --tag-relative -L - -f"$dir/$$.tags" --languages=-javascript,sql +mv "$dir/$$.tags" "$dir/tags" + diff --git a/git/.git_template/hooks/post-checkout b/git/.git_template/hooks/post-checkout new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/git/.git_template/hooks/post-checkout @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git/.git_template/hooks/post-commit b/git/.git_template/hooks/post-commit new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/git/.git_template/hooks/post-commit @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git/.git_template/hooks/post-merge b/git/.git_template/hooks/post-merge new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/git/.git_template/hooks/post-merge @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git/.git_template/hooks/post-rewrite b/git/.git_template/hooks/post-rewrite new file mode 100755 index 0000000..fe8972d --- /dev/null +++ b/git/.git_template/hooks/post-rewrite @@ -0,0 +1,4 @@ +#!/bin/sh +case "$1" in + rebase) exec .git/hooks/post-merge ;; +esac -- cgit v1.2.3