You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
619 B
25 lines
619 B
#!/bin/sh |
|
set -eu |
|
|
|
APPDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) |
|
VENV_DIR="$APPDIR/usr/opt/python" |
|
GAME_DIR="$APPDIR/usr/share/mice" |
|
|
|
if [ -n "${MICE_DATA_DIR:-}" ]; then |
|
DATA_DIR="$MICE_DATA_DIR" |
|
elif [ -n "${XDG_DATA_HOME:-}" ]; then |
|
DATA_DIR="$XDG_DATA_HOME/mice" |
|
else |
|
DATA_DIR="$HOME/.local/share/mice" |
|
fi |
|
|
|
mkdir -p "$DATA_DIR" |
|
|
|
export PATH="$VENV_DIR/bin:${PATH:-}" |
|
export LD_LIBRARY_PATH="$APPDIR/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" |
|
export MICE_PROJECT_ROOT="$GAME_DIR" |
|
export MICE_DATA_DIR="$DATA_DIR" |
|
export PYTHONNOUSERSITE=1 |
|
|
|
cd "$GAME_DIR" |
|
exec "$VENV_DIR/bin/python" rats.py "$@" |