12 lines
282 B
Bash
12 lines
282 B
Bash
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname "$0")" && pwd)"
|
|
REPO_ROOT="$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)"
|
|
|
|
git -C "$REPO_ROOT" config core.hooksPath "$REPO_ROOT/githooks"
|
|
|
|
printf '%s\n' "Git hooks installed."
|
|
printf '%s\n' "core.hooksPath=$REPO_ROOT/githooks"
|