diff options
author | David Melik <dchmelik@gmail.com> | 2010-05-13 00:58:13 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-13 00:58:13 +0200 |
commit | b1b8346532c8add0621fbb1bb6c470a7c67b83e4 (patch) | |
tree | 17ac986f8daf3e7c2d73dfe642f384da17717e19 /games/tomenet/tomenet.sh | |
parent | a545f36fd178494632fe381a25a06d50894cae05 (diff) | |
download | slackbuilds-b1b8346532c8add0621fbb1bb6c470a7c67b83e4.tar.gz |
games/tomenet: Added to 13.0 repository
Diffstat (limited to 'games/tomenet/tomenet.sh')
-rw-r--r-- | games/tomenet/tomenet.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/games/tomenet/tomenet.sh b/games/tomenet/tomenet.sh new file mode 100644 index 0000000000..464bb88517 --- /dev/null +++ b/games/tomenet/tomenet.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +GAMES_TOMENET=/usr/share/games/tomenet + +if [ ! -e ${HOME}/.tomenet ]; then + mkdir -p ${HOME}/.tomenet + + # Make a copy of the lib directory for the user + cp -R ${GAMES_TOMENET}/lib ${HOME}/.tomenet/ + + # Server configuration files + cp ${GAMES_TOMENET}/tomenet.cfg ${GAMES_TOMENET}/forbidlist ${HOME}/.tomenet/ + + # Create an account file + touch ${HOME}/.tomenet/tomenet.acc + + # Create links for running the server in ${HOME}/.tomenet + ln -s ${GAMES_TOMENET}/tomenet.server ${HOME}/.tomenet/tomenet.server + ln -s ${GAMES_TOMENET}/evilmeta ${HOME}/.tomenet/evilmeta +fi + +cd ${HOME}/.tomenet + +# Point $TOMENET_PATH to the local lib directory +export TOMENET_PATH=${HOME}/.tomenet/lib + +case $(basename $0) in + tomenet) + exec ${GAMES_TOMENET}/tomenet "$@" + ;; + tomnet.console) + exec ${GAMES_TOMENET}/tomenet.console "$@" + ;; + tomenet.server) + exec ${GAMES_TOMENET}/tomenet.server "$@" + ;; + accedit) + exec ${GAMES_TOMENET}/accedit "$@" + ;; + evilmeta) + exec ${GAMES_TOMENET}/evilmeta "$@" + ;; + esac
\ No newline at end of file |