diff options
author | David Melik <dchmelik@gmail.com> | 2017-05-22 16:16:09 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-05-27 07:30:45 +0700 |
commit | ae342414f16bfb757ae217b2dc0bad3cf4896e88 (patch) | |
tree | 650f7729f8362f8470a35a85c462bbc882eacfc6 /games/mangband/mangband.sh | |
parent | 969e85c89888fdf169a536a54cbfc187690bf6a4 (diff) | |
download | slackbuilds-ae342414f16bfb757ae217b2dc0bad3cf4896e88.tar.gz |
games/mangband: Added (graphical dungeon adventure game).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/mangband/mangband.sh')
-rw-r--r-- | games/mangband/mangband.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/games/mangband/mangband.sh b/games/mangband/mangband.sh new file mode 100644 index 0000000000..717bc06fae --- /dev/null +++ b/games/mangband/mangband.sh @@ -0,0 +1,32 @@ +# #!/bin/sh + +GAMES_MANGBAND=/usr/share/games/mangband + +if [ ! -e ${HOME}/.mangband ]; then + mkdir -p ${HOME}/.mangband + + # Make a copy of the lib directory for the user + cp -R ${GAMES_MANGBAND}/lib ${HOME}/.mangband/ + + # Server configuration files + cp ${GAMES_MANGBAND}/mangband.cfg ${HOME}/.mangband/ + + # Create an account file + #touch ${HOME}/.mangband/mangband.acc + + # Create links for running the server in ${HOME}/.mangband +fi + +cd ${HOME}/.mangband + +# Point $MANGBAND_PATH to the local lib directory +export MANGBAND_PATH=${HOME}/.mangband/lib + +case $(basename $0) in + mangband) + exec ${GAMES_MANGBAND}/mangclient "$@" + ;; + mangband.server) + exec ${GAMES_MANGBAND}/runserv "$@" + ;; + esac |