-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
49 lines (44 loc) · 1013 Bytes
/
run.sh
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
#!/bin/bash
challenge="1"
host="localhost"
robname="theAgent"
pos="0"
outfile="mapping.out"
while getopts "c:h:r:p:f:" op
do
case $op in
"c")
challenge=$OPTARG
;;
"h")
host=$OPTARG
;;
"r")
robname=$OPTARG
;;
"p")
pos=$OPTARG
;;
"f")
outfile=$OPTARG
;;
default)
echo "ERROR in parameters"
;;
esac
done
shift $(($OPTIND-1))
case $challenge in
1)
# how to call agent for challenge 1
python mainC1.py -h "$host" -p "$pos" -r "$robname"
;;
2)
# how to call agent for challenge 2
java mainC2 -h "$host" -p "$pos" -r "$robname" -f "$outfile" # assuming -f is the option for the map
;;
3)
# how to call agent for challenge 3
./mainC3 -h "$host" -p "$pos" -r "$robname" -f "$outfile" # assuming -f is the option for the path
;;
esac