mirror of
git://f0xx.org/ac/ac-scripts
synced 2026-07-29 05:38:33 +03:00
initial
This commit is contained in:
11
install-git-hooks.sh
Executable file
11
install-git-hooks.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install repo git hooks (header pre-commit + post-commit).
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
git -C "$ROOT" config core.hooksPath .githooks
|
||||
chmod +x "$ROOT/.githooks/pre-commit"
|
||||
chmod +x "$ROOT/.githooks/post-commit"
|
||||
chmod +x "$ROOT/scripts/header-pre-commit.py"
|
||||
chmod +x "$ROOT/scripts/header-post-commit.py"
|
||||
chmod +x "$ROOT/scripts/apply-project-headers.py"
|
||||
echo "Installed hooks via core.hooksPath=.githooks (pre-commit + post-commit)"
|
||||
Reference in New Issue
Block a user