From 5071c8caf2a1897c7b376a66aa09b04ea562c1da Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 1 May 2016 16:41:54 -0400 Subject: [PATCH] Fix autogen.sh for separate worktrees * autogen.sh: Use the $hooks variable in the $sample_hooks loop, instead of assuming .git/hooks is a directory. --- autogen.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index cd0accd..3809942 100755 --- a/autogen.sh +++ b/autogen.sh @@ -327,8 +327,9 @@ sample_hooks= if test -n "$sample_hooks"; then for hook in $sample_hooks; do - cp $cp_options -- "$hooks/$hook.sample" "$hooks/$hook" || exit - chmod a-w .git/hooks/$hook || exit + dst=$hooks/$hook + cp $cp_options -- "$dst.sample" "$dst" || exit + chmod -- a-w "$dst" || exit done fi else -- 2.8.0