#!/usr/bin/env bash
# Start the local ahprice window (macOS / Linux).
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
SERVER="$ROOT/server"
SCRIPT="$SERVER/ahprice_server.py"
[[ -f "$SCRIPT" ]] || { echo "ahprice: missing $SCRIPT" >&2; exit 1; }
if ! command -v python3 >/dev/null 2>&1; then
  echo "ahprice: Python 3.9 or newer is required (python3 on PATH)." >&2
  exit 1
fi
cd "$SERVER"
exec python3 "$SCRIPT" "$@"
