INSTALL.sh 667 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. set -eu
  3. ROOT=$(CDPATH= cd -- "$(dirname "$0")" && pwd)
  4. cd "$ROOT"
  5. mkdir -p logs
  6. echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) INSTALL" > logs/install.log
  7. PY=""
  8. for c in python3.13 python3.12 python3.11; do
  9. if command -v "$c" >/dev/null 2>&1; then
  10. PY=$(command -v "$c")
  11. break
  12. fi
  13. done
  14. if [ -z "$PY" ]; then
  15. echo "没有找到 Python 3.11/3.12/3.13。"
  16. echo "若你没有安装 Python,请改用 Linux 便携包:解压后运行 ./START_HERE.sh。"
  17. echo "missing python" >> logs/install.log
  18. exit 1
  19. fi
  20. echo "using $PY" >> logs/install.log
  21. "$PY" "$ROOT/install_kit.py"
  22. echo "安装成功。接下来可以运行 ./RUN_DEMO.sh 或 ./SELF_TEST.sh。"