/
start
47 lines (37 loc) · 884 Bytes
/
start
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
#!/bin/sh
HOST=$1
BASEDIR=$2
NUM=$3
LIBPATH=/usr/local/lib
if [ x"$LIBPATH" != x ]; then
if [ x"$LD_LIBRARY_PATH" = x ]; then
LD_LIBRARY_PATH=$LIBPATH
else
LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH
fi
export LD_LIBRARY_PATH
fi
teamname="robotaFC"
player="./src/robotaFC_player"
coach="./src/robotaFC_coach"
config="./src/player.conf"
config_dir="./src/formations-dt"
coach_config="./src/coach.conf"
opt="--player-config ${config} --config_dir ${config_dir}"
opt="${opt} -h ${HOST} -t ${teamname}"
coachopt="--coach-config ${coach_config}"
coachopt="${coachopt} -h ${HOST} -t ${teamname}"
team_graphic="--use_team_graphic on --team_graphic_file ./src/team_logo.xpm"
coachopt="${coachopt} ${team_graphic}"
cd $BASEDIR
case $NUM in
1)
$player $opt -g
;;
2)
$coach $coachopt
;;
*)
$player $opt
;;
esac