blob: 2f3c44763a6c422608c10dcdc21f00abcda67961 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#!/bin/bash
#
# starts Armagetron Advanced Dedicated Server from the installation directory
GAME_CONFDIR=/etc/games/armagetronad-ded
GAME_LIBDIR=/usr/games/lib/armagetronad-ded
GAME_DATADIR=/usr/share/games/armagetronad-ded
USER_DATADIR=/etc/games/armagetronad-ded
CONFIGDIR=/etc/games/armagetronad-ded
NO=$'\x1b[0;0m'
RD=$'\x1b[31;01m'
GR=$'\x1b[32;01m'
YL=$'\x1b[33;01m'
echo "${GR} *${NO} Checking Configuration."
if test ! -r $HOME/.armagetronad-ded ; then
mkdir $HOME/.armagetronad-ded
if test -r $HOME/.ArmageTronrc ; then
echo "${YL} *${NO} Migrating very old configuration."
cp $HOME/.ArmageTronrc $HOME/.armagetronad-ded/user.cfg
fi
fi
if test ! -r $HOME/.armagetronad-ded/var ; then
files=$( ls $HOME/.armagetronad-ded )
mkdir $HOME/.armagetronad-ded/var
echo "${GR} *${NO} Testing configuration."
test "$files" != "" && mv $files $HOME/.armagetronad-ded/var
fi
echo "${GR} *${NO} Done."
if test "x$1" = "x-h" ; then
echo "${RD} *${NO} Please uninstall Armagetron Advanced via Portage."
fi
if test "x$1" = "x--uninstall" ; then
echo "${RD} *${NO} Please uninstall Armagetron Advanced via Portage."
else
while true; do
$GAME_LIBDIR/armagetronad-dedicated \
--datadir $GAME_DATADIR \
--configdir $GAME_CONFDIR \
--userdatadir $HOME/.armagetronad-ded
done
fi
|