summaryrefslogtreecommitdiff
path: root/games/sdlpop/sdlpop.sh
diff options
context:
space:
mode:
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 "$@"