summaryrefslogtreecommitdiff
path: root/games/sdlpop/sdlpop.sh
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2017-03-17 07:36:03 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-03-18 06:58:59 +0700
commitda8a24a7a3f4d844d49fc09aea39e43fe319d4f7 (patch)
tree6b145ea79e8bd261b43f8dd8a4b0a0b8d1862143 /games/sdlpop/sdlpop.sh
parentff46e23a982ed602bf0d36eb617cb24777d0e2e4 (diff)
downloadslackbuilds-da8a24a7a3f4d844d49fc09aea39e43fe319d4f7.tar.gz
games/sdlpop: Updated for version 1.17.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'games/sdlpop/sdlpop.sh')
-rw-r--r--games/sdlpop/sdlpop.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/games/sdlpop/sdlpop.sh b/games/sdlpop/sdlpop.sh
index 84a03f6953..e3d41f51d8 100644
--- a/games/sdlpop/sdlpop.sh
+++ b/games/sdlpop/sdlpop.sh
@@ -3,6 +3,10 @@
# 20160812 bkw:
# wrapper script for sdlpop, for slackbuilds.org
+# 20170317 bkw: updated for v1.17, mods dir has to be writable by users,
+# so we can't just symlink it from /usr/share. however, if any mods are
+# in /usr/share, we copy them (again, need to be writable)
+
EXE=/usr/libexec/sdlpop/prince
USERDIR=$HOME/.sdlpop
SHAREDIR=/usr/share/games/sdlpop
@@ -11,11 +15,14 @@ INI=SDLPoP.ini
[ ! -e $USERDIR ] && mkdir -p $USERDIR
cd $USERDIR || exit 1
-for file in $SHAREDIR/*; do
+[ -e data ] || ln -s $SHAREDIR/data data
+
+mkdir -p mods
+for file in $SHAREDIR/mods/*; do
base="$( basename "$file" )"
- [ -e "$base" ] || ln -s "$file" "$base"
+ [ -e mods/"$base" ] || cp -a "$file" mods/"$base"
done
-[ -L $INI ] && ( rm -f $INI ; cp $SHAREDIR/$INI . )
+[ -e $INI ] || cp $SHAREDIR/$INI .
exec $EXE "$@"