summaryrefslogtreecommitdiffstats
path: root/games/sdlpop/sdlpop.sh
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2016-08-14 08:29:02 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-14 08:29:02 +0700
commit2aea708a443843a1f5e7366250c234df542fcfd4 (patch)
treea238721cce8fc4d11e7d2f4f8626d396eab9fd27 /games/sdlpop/sdlpop.sh
parenteb3c68f8beb3131e8c9a5f4baa09a4080998bcb0 (diff)
downloadslackbuilds-2aea708a443843a1f5e7366250c234df542fcfd4.tar.gz
slackbuilds-2aea708a443843a1f5e7366250c234df542fcfd4.tar.xz
games/sdlpop: Added (Prince of Persia rewrite).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/sdlpop/sdlpop.sh')
-rw-r--r--games/sdlpop/sdlpop.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/games/sdlpop/sdlpop.sh b/games/sdlpop/sdlpop.sh
new file mode 100644
index 0000000000..84a03f6953
--- /dev/null
+++ b/games/sdlpop/sdlpop.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# 20160812 bkw:
+# wrapper script for sdlpop, for slackbuilds.org
+
+EXE=/usr/libexec/sdlpop/prince
+USERDIR=$HOME/.sdlpop
+SHAREDIR=/usr/share/games/sdlpop
+INI=SDLPoP.ini
+
+[ ! -e $USERDIR ] && mkdir -p $USERDIR
+cd $USERDIR || exit 1
+
+for file in $SHAREDIR/*; do
+ base="$( basename "$file" )"
+ [ -e "$base" ] || ln -s "$file" "$base"
+done
+
+[ -L $INI ] && ( rm -f $INI ; cp $SHAREDIR/$INI . )
+
+exec $EXE "$@"