565266d480
- Add glest/files/pkg-message file - Modify glest-wrapper file. Now it works with home directory and place the configuration files there. - Remove glest-data/pkg-plist file
24 lines
795 B
Bash
24 lines
795 B
Bash
#!/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
|
|
# ~/.glest, and create symlinks to the data files.
|
|
|
|
if [ -d ~/.glest ]
|
|
then
|
|
echo "Using existing ~/.glest directory."
|
|
else
|
|
echo "Creating ~/.glest directory."
|
|
cd %%DATADIR%% || exit 1
|
|
find * -type d -exec mkdir -p ~/.glest/{} \;
|
|
find * -type f -exec ln -s %%DATADIR%%/{} ~/.glest/{} \; 2>/dev/null
|
|
mkdir -p ~/.glest/screens
|
|
mkdir -p ~/.glest/shaders/standard
|
|
touch ~/.glest/glest.log
|
|
rm ~/.glest/glest.ini ~/.glest/configuration.xml ~/.glest/glest
|
|
cp -f %%DATADIR%%/configuration.xml ~/.glest/
|
|
cp -f %%DATADIR%%/glest.ini ~/.glest/
|
|
fi
|
|
|
|
cd ~/.glest || exit 1
|
|
exec %%DATADIR%%/glest "$@"
|