summaryrefslogtreecommitdiff
path: root/games/sdlpop/sdlpop.sh
blob: 84a03f69535878d002e8d22273201c9b18ff9f3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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 "$@"