#!/bin/sh

# create dir and copy files, if needed
[ ! -d ~/.nestopia ] && mkdir ~/.nestopia
[ ! -f ~/.nestopia/nstcontrols ]  && cp "%GAMES_DATADIR%/nestopia/nstcontrols" ~/.nestopia/
[ ! -f ~/.nestopia/NstDatabase.xml ]  && cp "%GAMES_DATADIR%/nestopia/NstDatabase".xml ~/.nestopia/

# wrap around the emu
exec nestopia.bin "$@"

