okf-wiki 1.1.1
First public release, published as one snapshot. What changed between versions is in CHANGELOG.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
commit
0fd86a23a3
227 changed files with 96077 additions and 0 deletions
13
tools/install-hooks.sh
Executable file
13
tools/install-hooks.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
# install-hooks.sh - installs the repository-local git hooks that run the
|
||||
# excluded-terms check before every commit (staged files) and on every commit
|
||||
# message. The machine's global hook dispatcher runs these after its own rules.
|
||||
# Run once per clone. bash 3.2 safe, ASCII only.
|
||||
set -eu
|
||||
ROOT=$(git rev-parse --show-toplevel)
|
||||
HOOKS="$(git rev-parse --git-common-dir)/hooks"
|
||||
mkdir -p "$HOOKS"
|
||||
printf '#!/bin/bash\nexec "%s/tools/check-excluded-terms.sh" --staged\n' "$ROOT" > "$HOOKS/pre-commit"
|
||||
printf '#!/bin/bash\nexec "%s/tools/check-excluded-terms.sh" --message "$1"\n' "$ROOT" > "$HOOKS/commit-msg"
|
||||
chmod +x "$HOOKS/pre-commit" "$HOOKS/commit-msg"
|
||||
echo "installed: $HOOKS/pre-commit, $HOOKS/commit-msg"
|
||||
Loading…
Add table
Add a link
Reference in a new issue