14 lines
353 B
Bash
14 lines
353 B
Bash
|
|
#!/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"
|