Prepare macOS package and improve output handling

This commit is contained in:
2026-08-09 12:09:08 +02:00
parent eb915333f0
commit 355ea3e509
36 changed files with 211 additions and 9519 deletions
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
set -u
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
pause_on_exit() {
printf '\nPress Return to close this window...'
read -r _
}
trap pause_on_exit EXIT
fail() {
printf '\nError: %s\n' "$1" >&2
exit 1
}
cd "$SCRIPT_DIR" || fail "Could not open the project directory."
command -v python3 >/dev/null 2>&1 || fail \
"python3 was not found. Install Python 3, then run this installer again."
if [ ! -x ".venv/bin/python" ] || ! ".venv/bin/python" -m pip --version >/dev/null 2>&1; then
printf 'Creating virtual environment...\n'
python3 -m venv --clear .venv || fail \
"Could not create .venv. Make sure your Python installation includes venv support."
else
printf 'Using existing virtual environment.\n'
fi
printf 'Installing dependencies...\n'
".venv/bin/python" -m pip install -r requirements.txt || fail \
"Dependency installation failed."
printf '\nInstallation completed successfully.\n'
printf 'You can now run radioeins-top100.command.\n'