Annotation of ports/games/fheroes2/files/fheroes2, Revision 1.1.1.1
1.1 yason 1: #!/bin/sh
2:
3: # The executable needs to be run from its data directory, and needs to store
4: # configuration in it. We therefore mirror the data directory hierarchy in
5: # ~/.flare, and create symlinks to the data files.
6:
7: if [ -d ~/.flare ]
8: then
9: echo "Using existing ~/.flare directory."
10: else
11: echo "Creating ~/.flare directory."
12: cd %%DATADIR%% || exit 1
13: find . -type d \! \( -name config \) -exec mkdir -p ~/.flare/{} \;
14: find * -type f -exec ln -s %%DATADIR%%/{} ~/.flare/{} \; 2>/dev/null
15: mkdir ~/.flare/config ~/.flare/saves
16: cp -f %%DATADIR%%/config/keybindings.txt ~/.flare/config/
17: cp -f %%DATADIR%%/config/settings.txt ~/.flare/config/
18: chmod 640 ~/.flare/config/keybindings.txt ~/.flare/config/settings.txt
19: fi
20:
21: cd ~/.flare || exit 1
22: echo "Loading..."
23: exec %%DATADIR%%/flare "$@"
CVSweb