summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-01-26 22:34:25 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-01-26 22:35:03 -0800
commit589094a48966583f6b428d89807f504f5401b4ed (patch)
tree0483fda151eda8038979c0599a0363e7f6fdd6df /autogen.sh
parentb28c81bcf2c00b282cd7f25bf784563e181fc70c (diff)
downloademacs-589094a48966583f6b428d89807f504f5401b4ed.tar.gz
Port autogen.sh hook creation to Apple Git
* autogen.sh: Do not assume that the hook samples exist. This ports to git version 1.9.3 (Apple Git-50). For some reason Apple decided to populate the git hooks directory in a different way from the way that standard Git does it. The downside is that patch applications won't be checked on Apple, but that's better than autogen.sh failing. Problem reported by Sam Steingold in: http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00898.html
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index c3ae1d766df..bc9c5a008e0 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -226,6 +226,7 @@ if test -d .git/hooks; then
tailored_hooks="$tailored_hooks $hook"
done
for hook in applypatch-msg pre-applypatch; do
+ test ! -r .git/hooks/$hook.sample ||
cmp .git/hooks/$hook.sample .git/hooks/$hook >/dev/null 2>&1 ||
sample_hooks="$sample_hooks $hook"
done