summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2016-05-04 21:09:22 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-05-04 21:11:37 -0700
commit403cc9fad9534338050b0ce14941e3d9cd30079a (patch)
treebf0551860c4d5bd45fc0a6641276cf6a33baf957 /autogen.sh
parent32f5bf0c29bbad6524f71079e4380b8156289551 (diff)
downloademacs-403cc9fad9534338050b0ce14941e3d9cd30079a.tar.gz
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.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh5
1 files changed, 3 insertions, 2 deletions
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