update_windows.bat / update_macos.command: fetch release tags from Gitea, move the folder to the newest vX.Y (git downloads only what changed), connect a folder unpacked from a release zip on first run, install git/uv when missing and sync the Python libraries. Developer copies on a branch are left alone. run_* and update_* share one environment (KotaTechnicianTool/venv) instead of one per version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
1019 B
Bash
Executable File
21 lines
1019 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)
|
|
# One shared Python environment for every version (update_macos.command keeps it current).
|
|
export UV_PROJECT_ENVIRONMENT="$HOME/Library/Caches/KotaTechnicianTool/venv"
|
|
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..."
|