diff options
author | B. Watson <yalhcru@gmail.com> | 2016-10-28 05:41:58 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-10-28 05:41:58 +0700 |
commit | 59e668ade236a9081f480158e8b794667c6d0667 (patch) | |
tree | c0eb48909e3a3a23ead4491b316545cdede629eb /games/domination/domination.sh | |
parent | cc2254d046e9cadd8f856873f693a1a27c0e1466 (diff) | |
download | slackbuilds-59e668ade236a9081f480158e8b794667c6d0667.tar.gz |
games/domination: Added (clone of the board game Risk).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/domination/domination.sh')
-rw-r--r-- | games/domination/domination.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/games/domination/domination.sh b/games/domination/domination.sh new file mode 100644 index 0000000000..9a8b96c536 --- /dev/null +++ b/games/domination/domination.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +# wrapper script for domination, part of the SlackBuilds.org +# project. Written by B. Watson, licensed under the WTFPL. + +# script is installed as domination and domination-swing, checks how +# it was called to know what java class to invoke. + +PRGNAM=domination +USERDIR="$HOME/.$PRGNAM" +SHAREDIR="/usr/share/games/$PRGNAM" + +# program expects to read this stuff from the current directory. +LINKS="Domination.jar help lib maps resources" + +[ ! -e "$USERDIR" ] && mkdir -p "$USERDIR" +if ! cd "$USERDIR"; then + echo "$0: failed to create/change to $USERDIR" 1>&2 + exit 1 +fi + +for dir in $LINKS; do + [ ! -e $dir ] && ln -s $SHAREDIR/$dir $dir +done + +# program expects to write to this stuff in the current dir. +mkdir -p saves +[ ! -e game.ini ] && cat $SHAREDIR/game.ini > game.ini + +if [ "$( basename "$0" )" = "$PRGNAM-swing" ]; then + exec java -cp Domination.jar net.yura.domination.ui.swinggui.SwingGUIFrame "$@" +else + exec java -jar Domination.jar "$@" +fi |