2007-02-25 16:17:51 +01:00
|
|
|
#!/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
|
2007-09-06 00:38:15 +02:00
|
|
|
# ~/.sdlmame, and create symlinks to the data files.
|
2007-02-25 16:17:51 +01:00
|
|
|
#
|
|
|
|
|
2007-09-06 00:38:15 +02:00
|
|
|
if [ ! -d ~/.sdlmame ]
|
2007-02-25 16:17:51 +01:00
|
|
|
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 "$@"
|