#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
if [[ "${1:-}" == "build" ]]; then
  set +e
  "$ROOT/tools/fast_build.sh" "$@"
  rc=$?
  set -e
  if [[ $rc -eq 0 ]]; then exit 0; fi
  if [[ $rc -ne 2 ]]; then exit $rc; fi
fi
PYTHONPATH="$ROOT/compiler${PYTHONPATH:+:$PYTHONPATH}" exec python3 -m nexus.compiler "$@"
