mirror of
https://github.com/db9979/uconsole_asw_game.git
synced 2026-12-05 20:34:16 +01:00
21 lines
624 B
Bash
Executable File
21 lines
624 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Desktop launcher: keep startup errors visible in the terminal.
|
|
set -u
|
|
|
|
project_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) || exit 1
|
|
cd -- "$project_dir" || exit 1
|
|
|
|
if [[ ! -x .venv/bin/python ]]; then
|
|
printf 'U-Jagd: Python-Umgebung fehlt: %s/.venv/bin/python\n' "$project_dir" >&2
|
|
read -r -p 'Zum Schliessen Enter druecken ... ' _
|
|
exit 1
|
|
fi
|
|
|
|
.venv/bin/python main.py --web-host "$@"
|
|
status=$?
|
|
if (( status != 0 )); then
|
|
printf '\nU-Jagd-Webserver wurde mit Fehlercode %s beendet.\n' "$status" >&2
|
|
read -r -p 'Zum Schliessen Enter druecken ... ' _
|
|
fi
|
|
exit "$status"
|