-
Notifications
You must be signed in to change notification settings - Fork 0
/
perf.sh
executable file
·51 lines (46 loc) · 1017 Bytes
/
perf.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
#
# perf.sh for perf.sh in /home/axel/projects/progress/dante/
#
# Made by Axel Vandenabeele
# Login <axel.vandenabeele@epitech.eu>
#
# Started on Sun May 14 18:34:26 2017 Axel Vandenabeele
# Last update Sun May 14 21:20:56 2017 Axel Vandenabeele
#
if [ $# != 4 ]
then
echo "use : ./perf.sh <nbr_of_lines> <nbr_of_cols> <is_perfect> <file>"
exit
fi
make > /dev/null
echo ""
./generator/generator $1 $2 $3 > $4
echo -n -e "\n\nall or one ? "
read methode
if [ $methode = all ]
then
echo -e "\n\033[31m[depth]\033[0m\n"
time ./depth/solver ./$4
echo -e "\n\033[31m[breadth]\033[0m\n"
time ./breadth/solver ./$4
elif [ $methode = one ]
then
echo -n "which one ? "
read solver
if [ $solver = depth ]
then
echo -e "\n\033[31m[depth]\033[0m\n"
time ./depth/solver ./$4
elif [ $solver = breadth ]
then
echo -e "\033[31m[breadth]\033[0m\n"
time ./breadth/solver ./$4
else
echo -e "\nno Match"
exit
fi
else
echo -e "\nnot an option"
exit
fi
make fclean > /dev/null