minecraft-pi-reborn/debian/usr/bin/minecraft-pi

23 lines
532 B
Bash
Executable File

#!/bin/sh
set -e
FEATURES="$(zenity --class minecraft-pi --list --checklist --column 'Enabled' --column 'Feature' FALSE 'Touch GUI' FALSE 'Survival Mode' FALSE 'Fix Bow & Arrow' FALSE 'Fix Attacking' FALSE 'Mob Spawning')"
export FEATURES
virgl_test_server &
PID="$!"
if ! id -Gn "$(whoami)" | grep '\bdocker\b' > /dev/null; then
pkexec adduser "$(whoami)" docker
fi
xhost local:root
DOCKER_COMPOSE="docker-compose -f /usr/share/minecraft-pi/docker-compose.yml"
${DOCKER_COMPOSE} up
${DOCKER_COMPOSE} down
kill "${PID}"