diff options
| author | Noam Postavsky | 2016-05-04 21:09:22 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-05-04 21:11:37 -0700 |
| commit | 403cc9fad9534338050b0ce14941e3d9cd30079a (patch) | |
| tree | bf0551860c4d5bd45fc0a6641276cf6a33baf957 | |
| parent | 32f5bf0c29bbad6524f71079e4380b8156289551 (diff) | |
| download | emacs-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-x | autogen.sh | 5 |
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 |