-
Notifications
You must be signed in to change notification settings - Fork 1
/
runEvaluator.sh
executable file
·80 lines (76 loc) · 1.89 KB
/
runEvaluator.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
TEST_DAYS=("2013-08-16" "2013-08-17" "2013-08-18" "2013-08-19")
if [ $# != 2 ]
then
echo "Wrong Input"
echo "./runEvaluator.sh [DATE OPTION] [NUMBER OF FLIGHTS OPTION]"
exit
fi
if [ "$2" -lt -1 ] || [ "$2" -eq 0 ]
then
echo "Enter number of flights to test"
echo "Enter -1 to test all the flights"
exit
fi
TEST_DAY=-1
for n in ${TEST_DAYS[@]};
do
if [ "$1" == $n ]
then
TEST_DAY=$1
break
fi
done
if [ $TEST_DAY == -1 ]
then
echo "Enter date in range [2013-08-16 2013-08-17 2013-08-18 2013-08-19]"
exit
fi
cd ShellScripts
chmod +x backendScript.sh
chmod +x frontendScript.sh
chmod +x cudaScript.sh
chmod +x firstTimeSetup.sh
FreshRepoCheck="FreshRepo.txt"
while read -r line
do
if [ $line == 1 ]
then
echo -n "Performing first time setup ... "
gnome-terminal --disable-factory --geometry 50x10+1000+10 -- /bin/bash -c './firstTimeSetup.sh'
FirstTime=$!
wait $FirstTime
echo "Done"
fi
done < "$FreshRepoCheck"
echo -n "Starting Backend ... "
gnome-terminal --geometry 50x10+10+10 -- /bin/bash -c './backendScript.sh'
echo "Done"
input="../CUDA/OldVersionCheck.txt"
while read -r line
do
./cudaScript.sh $line
done < "$input"
echo -n "Generating the metrics for real data ... "
python3 Metrics.py $TEST_DAY $2
echo "Done"
echo -n "Starting Frontend ... "
gnome-terminal --geometry 50x10+10+1000 -- /bin/bash -c './frontendScript.sh'
echo "Done"
echo ""
if [ $2 == -1 ]
then
echo "Please upload the file in the location below to the website and hit the generate solution button"
echo ""
echo "/Dataset/$TEST_DAY/$TEST_DAY-WebsiteInputForFullDay.txt"
echo ""
else
echo "Please upload the file in the location below to the website and hit the generate solution button"
echo ""
echo "/ShellScripts/$TEST_DAY-WebsiteInput.txt"
echo ""
fi
echo "Please execute the command below after the solution is generated"
echo ""
echo "python3 ShellScripts/CompareMetric.py $TEST_DAY $2"
echo ""