1
0
mirror of git://f0xx.org/android_cast synced 2026-07-29 03:38:52 +03:00
Files
android_cast/scripts/install-git-hooks.sh
Anton Afanasyeu ee4947a348 header update
2026-05-20 17:24:50 +02:00

12 lines
485 B
Bash
Executable File

#!/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)"