#!/bin/bash # Double-click in Finder, or run: bash run_macos.command cd "$(dirname "$0")" || exit 1 # Keep the virtual environment out of the (Google Drive) tool folder. export UV_PROJECT_ENVIRONMENT="$HOME/Library/Caches/KotaTechnicianTool/venv-0.5" export PATH="$HOME/.local/bin:$PATH" if ! command -v uv >/dev/null 2>&1; then echo "uv (Python package runner) is not installed." echo "It will be installed for the current user from https://astral.sh/uv" read -r -p "Install uv now? [y/N] " answer [[ "$answer" =~ ^[Yy]$ ]] || exit 1 curl -LsSf https://astral.sh/uv/install.sh | sh || { echo "uv installation failed."; exit 1; } fi echo "Starting KOTA Sensorbox Technician Tool (first start downloads dependencies)..." uv run --frozen --no-dev --python 3.12 python -m kota_tech || read -r -p "Press Enter to close..."