#!/usr/bin/env bash # Point this repository at tracked hooks under githooks/ (post-commit push + optional remote pull). set -euo pipefail root=$(git rev-parse --show-toplevel 2>/dev/null) || { echo "Run from inside a FiWiManager git clone." >&2 exit 1 } cd "$root" git config core.hooksPath githooks echo "Set core.hooksPath=githooks in this repo." echo "" echo "To sync after each commit (when FIWI_POST_COMMIT_SYNC=1), add to your shell profile:" echo " export FIWI_POST_COMMIT_SYNC=1" echo " export FIWI_POST_COMMIT_REMOTE='user@host'" echo " export FIWI_POST_COMMIT_REMOTE_PATH='~/Code/FiWiManager'"