blob: 9a7c7215f76adf7af01ca179ce6e4ae041a000f2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/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
# ~/.cube, and create symlinks to the data files.
#
if [ -d ~/.sdlmame ]
then
echo "Using existing ~/.sdlmame directory."
else
echo "Creating ~/.sdlmame directory."
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 "$@"
|