blob: 54728083798f8928a9cd2775142dcd3131eb4a56 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/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.
if [ -d "~/.sauerbraten" ]; then
cd ~/.sauerbraten || exit 1
exec %%PREFIX%%/libexec/sauer_client
else
cd %%DATADIR%% || exit 1
find * -type d -exec mkdir -p ~/.sauerbraten/{} \; || exit 1
find * -type f -exec ln -s %%DATADIR%%/{} ~/.sauerbraten/{} \; 2>/dev/null || exit 1
cd ~/.sauerbraten || exit 1
exec %%PREFIX%%/libexec/sauer_client
fi
|