Files
eduforge/run.sh
2026-11-20 19:05:49 +00:00

23 lines
653 B
Bash

#!/usr/bin/env bash
# EduForge — установка зависимостей и запуск (Linux/macOS).
# Первый раз: chmod +x run.sh
set -euo pipefail
cd "$(dirname "$0")"
PY=""
for candidate in python3 python; do
if command -v "$candidate" >/dev/null 2>&1 \
&& "$candidate" -c 'import sys; sys.exit(0 if sys.version_info >= (3, 10) else 1)' 2>/dev/null; then
PY="$candidate"
break
fi
done
if [ -z "$PY" ]; then
echo "[!] Не найден Python 3.10+."
echo " Debian/Ubuntu: sudo apt install python3 python3-venv python3-pip"
echo " macOS: brew install python"
exit 1
fi
exec "$PY" run.py "$@"