#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname "$0")/.."

if [ ! -x ".venv/bin/python" ]; then
  echo "가상환경이 없습니다. 먼저 아래를 실행하세요."
  echo "python3 -m venv .venv"
  echo "source .venv/bin/activate"
  echo "pip install -r requirements.txt"
  exit 1
fi

export INTRANET_AUTO_RELOAD="${INTRANET_AUTO_RELOAD:-1}"

exec ./.venv/bin/python main.py
