1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00
nixpkgs/pkgs/games/assaultcube/launcher.sh
2018-02-05 16:06:49 +01:00

21 lines
435 B
Bash

#!@shell@
# original scripts are very awful
CUBE_DIR=@out@@gamedatadir@
case $(basename "$0") in
assaultcube-server)
CUBE_OPTIONS="-Cconfig/servercmdline.txt"
BINARYPATH=@out@/bin/ac_server
;;
assaultcube)
CUBE_OPTIONS="--home=${HOME}/.assaultcube/v1.2next --init"
BINARYPATH=@out@/bin/ac_client
;;
*) echo "$0" is not supported.
exit 1
esac
cd $CUBE_DIR
exec "${BINARYPATH}" ${CUBE_OPTIONS} "$@"