Files
X-Financial/tools/agent-change-log/install_post_commit_hook.sh

14 lines
353 B
Bash
Raw Normal View History

#!/bin/sh
# Install the versioned agent change-log post-commit hook into this checkout.
set -eu
repo_root="$(git rev-parse --show-toplevel)"
hook_path="$(git rev-parse --git-path hooks/post-commit)"
mkdir -p "$(dirname "$hook_path")"
cp "$repo_root/.githooks/post-commit" "$hook_path"
chmod +x "$hook_path"
printf 'installed_hook=%s\n' "$hook_path"