]> code.delx.au - gnu-emacs/blobdiff - autogen.sh
Fix autogen.sh for separate worktrees
[gnu-emacs] / autogen.sh
index cd0accd6793c1b442be8702a1caf77fa2977effb..3809942acf4bb27af3f740f9fc49ccc20c538543 100755 (executable)
@@ -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