From da8a24a7a3f4d844d49fc09aea39e43fe319d4f7 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 17 Mar 2017 07:36:03 -0400 Subject: games/sdlpop: Updated for version 1.17. Signed-off-by: B. Watson --- games/sdlpop/sdlpop.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'games/sdlpop/sdlpop.sh') 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 "$@" -- cgit v1.2.3