-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
executable file
·44 lines (40 loc) · 2.06 KB
/
run
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
#!/usr/bin/env bash
if which javac
then echo "jdk installed"
else
sudo apt-get install default-jre
sudo apt-get install default-jdk
fi
echo "---------------------------------------------------------------------------------"
echo "We replaced dom in the pipe. Input for dom requires use of the whole TS pipe."
echo "The whole pipe is run in this script except for monte_carlo. This program produces random output even with a seed."
echo "It was run once and redirected to input.txt, this is redirected to the rest of the pipe."
echo
echo "Please cd into etc and run ./ide, then run this script again. If you have done this, enter 'y', if not, enter anything else"
echo "---------------------------------------------------------------------------------"
read r
if [ "$r" = "y" ]
then
cd src
make
echo "Compiling"
javac -d ../bin -cp ../bin *.java
echo "---------------------------------------------------------------------------------"
echo "Input into dom"
echo "---------------------------------------------------------------------------------"
cat ../input.txt | dsl/brooks2
echo "---------------------------------------------------------------------------------"
echo "Output from dom"
echo "---------------------------------------------------------------------------------"
cat ../input.txt | dsl/brooks2 | java -cp ../bin Dom
echo "---------------------------------------------------------------------------------"
echo "Expected"
echo "---------------------------------------------------------------------------------"
cat ../input.txt | dsl/brooks2 | dom
echo "---------------------------------------------------------------------------------"
echo "Output from the whole pipe"
echo "---------------------------------------------------------------------------------"
cat ../input.txt | dsl/brooks2 | java -cp ../bin Dom | bestrest | super | rank
echo "---------------------------------------------------------------------------------"
echo "Note that dom scores are calculated randomly, they should be approximately, but not exactly equal."
fi