[BACK]Return to megaglest CVS log [TXT][DIR] Up to [local] / ports / games / megaglest / base / files

File: [local] / ports / games / megaglest / base / files / Attic / megaglest (download)

Revision 1.1, Sun Apr 24 18:49:08 2011 UTC (13 years, 2 months ago) by yason
Branch: MAIN
CVS Tags: megaglest_3-4-0

missed base subdir

#!/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
# ~/.megaglest3.4.0, and create symlinks to the data files.

if [ -d ~/.megaglest3.4.0 ]
then
        echo "Using existing ~/.megaglest3.4.0 directory."
else
        echo "Creating ~/.megaglest3.4.0 directory."
        cd %%DATADIR%% || exit 1
        find * -type d -exec mkdir -p ~/.megaglest3.4.0/{} \;
        find * -type f -exec ln -s %%DATADIR%%/{} ~/.megaglest3.4.0/{} \; 2>/dev/null
	mkdir -p ~/.megaglest3.4.0/screens
	mkdir -p ~/.megaglest3.4.0/shaders/standard
	touch ~/.megaglest3.4.0/megaglest.log
	rm ~/.megaglest3.4.0/glest.ini ~/.megaglest3.4.0/megaglest ~/.megaglest3.4.0/servers.ini
	cp -f %%DATADIR%%/glest.ini ~/.megaglest3.4.0/
	cp -f %%DATADIR%%/glestkeys.ini ~/.megaglest3.4.0/
	cp -f %%DATADIR%%/servers.ini ~/.megaglest3.4.0/
	chmod 640 ~/.megaglest3.4.0/glest.ini ~/.megaglest3.4.0/servers.ini
fi

cd ~/.megaglest3.4.0 || exit 1
echo "Please be patient while loading MegaGlest..."
exec %%DATADIR%%/glest.bin "$@"