Files
kota-technician-tool/run_macos.command
T
kkallas bfa7edce6f Technician tool v0.8
Imported from the Google Drive folder 004-technician_tool/v0.8.
2026-09-28 19:19:55 +02:00

21 lines
1002 B
Bash
Executable File

#!/bin/bash
# Double-click in Finder, or run: bash run_macos.command
cd "$(dirname "$0")" || exit 1
# If Finder refuses to open this file (Google Drive drops the executable bit), run it once as:
# bash run_macos.command (or: chmod +x run_macos.command)
# Keep the virtual environment out of the (Google Drive) tool folder.
export UV_PROJECT_ENVIRONMENT="$HOME/Library/Caches/KotaTechnicianTool/venv-0.8"
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..."