logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git
commit: 0414dc1af9a07c3806b7dc3876be9311c576ad55
parent 680b83d76c52aad61fa1c1d8ab0338305e015ad4
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  3 Aug 2017 15:02:42 +0200

git-hooks/post-update: fix hooks path and execute post-update.* only if executable

Diffstat:

Mgit-hooks/post-update5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/git-hooks/post-update b/git-hooks/post-update @@ -18,7 +18,6 @@ mkdir -p ${base} && cd "${base}" && stagit -c "${base}.cache" "${base}.git" && i printf "$update_f" stagit-index cd /git && stagit-index *.git > /git/index.html && is_ok -for i in post-update.*; do - printf "$update_f" "$i" - exec $i +for i in ${base}.git/hooks/post-update.*; do + [[ -x $i ]] && echo "${PS4:-+}${i}" && exec $i done