2006-04-30 12:25:12 +02: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
|
|
|
|
# ~/.sauerbraten, and create symlinks to the data files.
|
|
|
|
|
2006-08-14 17:29:20 +02:00
|
|
|
if [ -d ~/.sauerbraten ]
|
|
|
|
then
|
|
|
|
echo "Using existing ~/.sauerbraten directory."
|
2006-04-30 12:25:12 +02:00
|
|
|
else
|
2006-08-14 17:29:20 +02:00
|
|
|
echo "Creating ~/.sauerbraten directory."
|
2006-04-30 12:25:12 +02:00
|
|
|
cd %%DATADIR%% || exit 1
|
2006-08-14 17:29:20 +02:00
|
|
|
find * -type d -exec mkdir -p ~/.sauerbraten/{} \;
|
|
|
|
find * -type f -exec ln -s %%DATADIR%%/{} ~/.sauerbraten/{} \; 2>/dev/null
|
2006-04-30 12:25:12 +02:00
|
|
|
fi
|
2006-08-14 17:29:20 +02:00
|
|
|
|
|
|
|
cd ~/.sauerbraten || exit 1
|
|
|
|
exec %%PREFIX%%/libexec/sauer_server "$@"
|