You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
755 B
Bash
33 lines
755 B
Bash
#/bin/bash
|
|
|
|
# Note: This fails if there is no default toolchain installed
|
|
ELAN_HOME=$(lake env printenv ELAN_HOME)
|
|
|
|
# $1 : the game directory
|
|
# $2 : the lean4game folder
|
|
# $3 : the gameserver executable
|
|
|
|
(exec bwrap\
|
|
--bind $2 /lean4game \
|
|
--bind $1 /game \
|
|
--bind $ELAN_HOME /elan \
|
|
--bind /usr /usr \
|
|
--dev /dev \
|
|
--proc /proc \
|
|
--symlink usr/lib /lib\
|
|
--symlink usr/lib64 /lib64\
|
|
--symlink usr/bin /bin\
|
|
--symlink usr/sbin /sbin\
|
|
--clearenv \
|
|
--setenv PATH "/elan/bin:/bin" \
|
|
--setenv ELAN_HOME "/elan" \
|
|
--unshare-user \
|
|
--unshare-pid \
|
|
--unshare-net \
|
|
--unshare-uts \
|
|
--unshare-cgroup \
|
|
--die-with-parent \
|
|
--chdir "/game/.lake/packages/GameServer/server/.lake/build/bin/" \
|
|
./gameserver --server /game
|
|
)
|