#!/usr/bin/env zsh set -eu repo_root=$(git rev-parse --show-toplevel) hook_path="${repo_root}/.git/hooks/pre-commit" target="${repo_root}/scripts/git-hooks/pre-commit" mkdir -p "${repo_root}/.git/hooks" cat > "${hook_path}" <