freebsd-ports/emulators/sdlmame-devel/files/sdlmame.in

17 lines
464 B
Text
Raw Normal View History

#!/bin/sh
#
# The executable needs to be run from its data directory, and needs to store
# configuration in it. We therefore mirror the data directory hierarchy in
# ~/.sdlmame, and create symlinks to the data files.
#
if [ ! -d ~/.sdlmame ]
then
cd %%DATADIR%% || exit 1
find * -type d -exec mkdir -p ~/.sdlmame/{} \;
find * -type f -exec ln -s %%DATADIR%%/{} ~/.sdlmame/{} \; 2>/dev/null
fi
cd ~/.sdlmame || exit 1
exec %%PREFIX%%/libexec/sdlmame/mame "$@"