diff options
Diffstat (limited to 'pkgs/games/sdlpop/prince.sh')
-rw-r--r-- | pkgs/games/sdlpop/prince.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/games/sdlpop/prince.sh b/pkgs/games/sdlpop/prince.sh new file mode 100644 index 00000000000..698c347272a --- /dev/null +++ b/pkgs/games/sdlpop/prince.sh @@ -0,0 +1,16 @@ +#! @shell@ + +set -euo pipefail + +mkdir -p ~/.local/share/sdlpop +cd ~/.local/share/sdlpop + +for i in SDLPoP.ini mods; do + [ -e $i ] || cp -r @out@/share/sdlpop/$i . +done + +# Create the data symlink or update it (in case it is a symlink, else the user +# has probably tinkered with it and does not want it to be recreated). +[ ! -e data -o -L data ] && ln -sf @out@/share/sdlpop/data . + +exec -a "prince" @out@/bin/.prince-bin "$@" |