-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·51 lines (46 loc) · 1.15 KB
/
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
49
50
51
#!/bin/bash
# Purpose: Script to run the project code
# Usage: ./run.sh (flags)
# Default: Compiles and sets up the dataset, and/or does the evolution
# ---------------------------------------
compile=true
evolution=false
tests="all"
usage() {
echo "Usage: $0 [OPTIONS]"
echo "Options:"
echo " -d Disable the compilation & friends"
echo " -e Start evolving"
echo " -s Set which tests to use"
echo " -h Display this help message"
}
while getopts "s:deh" flag; do
case $flag in
s)
tests="${OPTARG}"
;;
d) # Disable compile
compile=false
;;
e) # Enable evolution
evolution=true
;;
h) # Display usage
usage
exit 0
;;
esac
done
if [ "$compile" == true ];
then
python3 core/compile.py clean
python3 core/compile.py $tests size &> /dev/null
python3 -m core.llvm_passes.create_dataset $tests
python3 core/pca.py $tests
fi
if [ "$evolution" = true ];
then
python3 -m core.evolution.evolution_master
python3 -m core.evolution.evolution_shapes
python3 -m core.evolution.plotmaker
fi