#!/usr/bin/env bash # Start the mock ARC backend. Requires `flask` in the active Python env. set -euo pipefail cd "$(dirname "$0")" # Find config.ini (project root is two levels up) PROJECT_ROOT="$(cd ../.. && pwd)" CONFIG="" for c in "$PROJECT_ROOT/config.ini" "$PROJECT_ROOT/build/config.ini" "$PROJECT_ROOT/build/Release/config.ini"; do if [ -f "$c" ]; then CONFIG="$c"; break; fi done if [ -n "$CONFIG" ]; then echo "[run.sh] generating mock data + cleaning events..." python3 gen_mock_data.py --config "$CONFIG" echo "" fi exec python3 mock_server.py --host 127.0.0.1 --port 8888 "$@"