From: Noam Postavsky Date: Thu, 5 May 2016 04:09:22 +0000 (-0700) Subject: Fix autogen.sh for separate worktrees X-Git-Tag: emacs-26.0.90~1997 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=403cc9fad9534338050b0ce14941e3d9cd30079a;p=emacs.git 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. --- 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