aboutsummaryrefslogtreecommitdiff
path: root/games/redeclipse/files/bfclient.in
blob: 01d3b7ef49491678a858cd0469f792f11d7866a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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
# ~/.bloodfrontier, and create symlinks to the data files.

if [ -d ~/.bloodfrontier ]
then
	echo "Using existing ~/.bloodfrontier directory."
else
	echo "Creating ~/.bloodfrontier directory."
	cd %%DATADIR%% || exit 1
	find * -type d -exec mkdir -p ~/.bloodfrontier/{} \;
	find * -type f -exec ln -s %%DATADIR%%/{} ~/.bloodfrontier/{} \; 2>/dev/null
fi

cd ~/.bloodfrontier || exit 1
exec %%PREFIX%%/libexec/bfclient "$@"