aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoam Postavsky2016-05-04 21:09:22 -0700
committerPaul Eggert2016-05-04 21:11:37 -0700
commit403cc9fad9534338050b0ce14941e3d9cd30079a (patch)
treebf0551860c4d5bd45fc0a6641276cf6a33baf957
parent32f5bf0c29bbad6524f71079e4380b8156289551 (diff)
downloademacs-403cc9fad9534338050b0ce14941e3d9cd30079a.tar.gz
emacs-403cc9fad9534338050b0ce14941e3d9cd30079a.zip
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.
-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
327 327
328 if test -n "$sample_hooks"; then 328 if test -n "$sample_hooks"; then
329 for hook in $sample_hooks; do 329 for hook in $sample_hooks; do
330 cp $cp_options -- "$hooks/$hook.sample" "$hooks/$hook" || exit 330 dst=$hooks/$hook
331 chmod a-w .git/hooks/$hook || exit 331 cp $cp_options -- "$dst.sample" "$dst" || exit
332 chmod -- a-w "$dst" || exit
332 done 333 done
333 fi 334 fi
334 else 335 else