-
Notifications
You must be signed in to change notification settings - Fork 0
/
qcompile.sh
executable file
·56 lines (48 loc) · 1.19 KB
/
qcompile.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
49
50
51
52
53
54
55
#!/bin/csh -f
if ($#argv != 2) then
echo "usage: qcompile teamname {east|west}, teamname plays {east|west} side"
exit 1
endif
echo "qcompile: Removing old stuff"
rm -f *.a
rm -f soccer
rm -f core
if ($1 == "deepq") then
echo "Don't play deepq against itself. Exiting..."
echo ""
exit 1
endif
if ($2 == "east") then
echo "qcompile: Team "{$1}" playing east"
echo "qcompile: Moving to ./teams/"{$1}" ."
echo "qcompile: Compiling libraries for the " {$1} " team."
cd teams/{$1}
make libeast.a
cp libeast.a ../..
make libcommon.a
cp libcommon.a ../../libeastcommon.a
echo "qcompile: Team deepq playing west"
cd ../deepq
make libwest.a
cp libwest.a ../..
make libcommon.a
cp libcommon.a ../../libwestcommon.a
else
echo "qcompile: Team "{$1}" playing west"
echo "qcompile: Moving to ./teams/"{$1}" ."
echo "qcompile: Compiling libraries for the " {$1} " team."
cd teams/{$1}
make libwest.a
cp libwest.a ../..
make libcommon.a
cp libcommon.a ../../libwestcommon.a
echo "qcompile: Team deepq playing east"
cd ../deepq
make libeast.a
cp libeast.a ../..
make libcommon.a
cp libcommon.a ../../libeastcommon.a
endif
cd ../..
echo "qcompile: Compiling and linking soccer."
make soccer