#!/bin/sh
set -eu

if ! command -v make >/dev/null 2>&1; then
  echo "pre-commit: make is required" >&2
  exit 1
fi

repo_root="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
PYTHON="$repo_root/.venv/bin/python"
if [ ! -x "$PYTHON" ]; then
  PYTHON=python3
fi
make PYTHON="$PYTHON" verify-public-boundary
