From 403cc9fad9534338050b0ce14941e3d9cd30079a Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 4 May 2016 21:09:22 -0700 Subject: 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(-) (limited to 'autogen.sh') diff --git a/autogen.sh b/autogen.sh index cd0accd6793..3809942acf4 100755 --- a/autogen.sh +++ b/autogen.sh @@ -327,8 +327,9 @@ if test -n "$tailored_hooks$sample_hooks"; then 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 -- cgit v1.2.3