From eb3a90619fed86298c96951af527a8483bdd1a3c Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Thu, 4 May 2023 21:04:46 -0700 Subject: ; Allow spaces in directory names for Git hooks * build-aux/git-hooks/post-commit: * build-aux/git-hooks/pre-push: Quote "$HOOKS_DIR" to allow spaces. --- build-aux/git-hooks/post-commit | 2 +- build-aux/git-hooks/pre-push | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'build-aux') diff --git a/build-aux/git-hooks/post-commit b/build-aux/git-hooks/post-commit index 10f43b539ac..12cae09206a 100755 --- a/build-aux/git-hooks/post-commit +++ b/build-aux/git-hooks/post-commit @@ -44,4 +44,4 @@ else fi git rev-parse HEAD | $awk -v reason=post-commit \ - -f $HOOKS_DIR/commit-msg-files.awk + -f "$HOOKS_DIR"/commit-msg-files.awk diff --git a/build-aux/git-hooks/pre-push b/build-aux/git-hooks/pre-push index 8d5dde2bbaf..420aae3492b 100755 --- a/build-aux/git-hooks/pre-push +++ b/build-aux/git-hooks/pre-push @@ -85,4 +85,4 @@ $awk -v origin_name="$1" ' # Print every SHA after oldref, up to (and including) newref. system("git rev-list --first-parent --reverse " oldref ".." newref) } -' | $awk -v reason=pre-push -f $HOOKS_DIR/commit-msg-files.awk +' | $awk -v reason=pre-push -f "$HOOKS_DIR"/commit-msg-files.awk -- cgit v1.2.3 From f204c4a6cfa77fdbb2573b728110576e206b0b20 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Thu, 4 May 2023 22:43:13 -0700 Subject: ; Use a Bourne shell-compatible form for command substitution * build-aux/git-hooks/post-commit: * build-aux/git-hooks/pre-push: Use `` instead of $(). --- build-aux/git-hooks/post-commit | 2 +- build-aux/git-hooks/pre-push | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'build-aux') diff --git a/build-aux/git-hooks/post-commit b/build-aux/git-hooks/post-commit index 12cae09206a..e02fee48db4 100755 --- a/build-aux/git-hooks/post-commit +++ b/build-aux/git-hooks/post-commit @@ -34,7 +34,7 @@ ### Code: -HOOKS_DIR=$(dirname $0) +HOOKS_DIR=`dirname "$0"` # Prefer gawk if available, as it handles NUL bytes properly. if type gawk >/dev/null 2>&1; then diff --git a/build-aux/git-hooks/pre-push b/build-aux/git-hooks/pre-push index 420aae3492b..a342814c1e3 100755 --- a/build-aux/git-hooks/pre-push +++ b/build-aux/git-hooks/pre-push @@ -31,7 +31,7 @@ ### Code: -HOOKS_DIR=$(dirname $0) +HOOKS_DIR=`dirname "$0"` # Prefer gawk if available, as it handles NUL bytes properly. if type gawk >/dev/null 2>&1; then -- cgit v1.2.3