blob: 571a01be7e0b51cf23e9aafbbca9f4185d7cc816 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
# Wrapper script for Megaglest.
MAINDIR=/usr/share/megaglest
BASEDIR="$HOME/.config"
DIR="$BASEDIR/megaglest"
if [ ! -d "$DIR" ]; then
mkdir -p $DIR
fi
cd $DIR
[ -f glest.ini ] || cp /usr/share/megaglest/glest.ini .
[ -h megaglest ] || ln -s /usr/share/megaglest/megaglest .
[ -f servers.ini ] || cp $MAINDIR/servers.ini .
[ -f glestkeys.ini ] || cp $MAINDIR/glestkeys.ini .
for i in data scenarios techs tilesets tutorials; do
[ -h $i ] || ln -s $MAINDIR/$i .
done
[ -d maps ] || mkdir maps
[ -d screens ] || mkdir screens
cd maps
for i in $MAINDIR/maps/*; do
[ -h `basename $i` ] || ln -s $i .
done
cd ..
exec ./megaglest
|