summaryrefslogtreecommitdiff
path: root/games/eduke32/eduke32.wrapper
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2010-05-11 22:53:43 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:53:43 +0200
commit9f30ad7fb90bbf5a00608d2fb431bfa892a521c8 (patch)
tree72d54d1362d5d3ba6f84c1210cfe258b3750db26 /games/eduke32/eduke32.wrapper
parentde5c18f83f9dbb0aa3f22d742c1f574736d9a6b5 (diff)
downloadslackbuilds-9f30ad7fb90bbf5a00608d2fb431bfa892a521c8.tar.gz
games/eduke32: Added to 12.1 repository
Diffstat (limited to 'games/eduke32/eduke32.wrapper')
-rw-r--r--games/eduke32/eduke32.wrapper24
1 files changed, 24 insertions, 0 deletions
diff --git a/games/eduke32/eduke32.wrapper b/games/eduke32/eduke32.wrapper
new file mode 100644
index 0000000000..969cf757ea
--- /dev/null
+++ b/games/eduke32/eduke32.wrapper
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Wrapper script for eduke32 and mapster32
+# Ensure ~/.eduke32 exists, populate with a symlink forest
+# (Need this because the game normally expects to run from its own dir)
+
+SHAREDIR=/usr/share/games/eduke32
+BINDIR=/usr/libexec/eduke32
+
+PROG="`echo $0 | sed 's/.*\///'`"
+mkdir -p ~/.eduke32
+
+if ! cd ~/.eduke32; then
+ echo 2>&1 "$PROG: Can't create ~/.eduke32 directory"
+ exit 1
+fi
+
+for i in autoload m32help.hlp SEHELP.HLP STHELP.HLP names.h tiles.cfg; do
+ if [ -e $SHAREDIR/$i -a ! -e $i ]; then
+ ln -s $SHAREDIR/$i $i
+ fi
+done
+
+exec $BINDIR/$PROG "$@"