#!/bin/sh # Install this repo's git hooks. Run once after cloning: ./scripts/install-hooks.sh # (Git does not clone hooks, so each working copy installs its own.) set -e here=$(cd "$(dirname "$0")/.." && pwd) for hook in "$here"/scripts/hooks/*; do name=$(basename "$hook") cp "$hook" "$here/.git/hooks/$name" chmod +x "$here/.git/hooks/$name" echo "installed $name" done