-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmi-makefile.sh
executable file
·53 lines (50 loc) · 1 KB
/
mi-makefile.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
#!/bin/bash
# Azul
files=(
"Compilateur.class"
"Compilateur.java"
"CompilateurConstants.class"
"CompilateurConstants.java"
"CompilateurTokenManager.class"
"CompilateurTokenManager.java"
"ParseException.class"
"ParseException.java"
"SimpleCharStream.class"
"SimpleCharStream.java"
"Token.class"
"Token.java"
"TokenMgrError.class"
"TokenMgrError.java"
)
# test & delete
for file in "${files[@]}"; do
if [ -f "$file" ]; then
rm "$file"
echo "$file deleted."
else
printf Clearing
sleep 0.2
printf .
sleep 0.2
printf .
sleep 0.2
printf .
sleep 0.2
printf .
clear
break
fi
done
# this "if" statement used to delete .java .class files (added files that we gonna not push everytime )
if [ $# -eq 1 ]; then
rm AST/*.class
exit 1
fi
javac AST/*.java
# program launching
javacc Compilateur.jj
javac *.java
echo "---- Starting -----"
java Compilateur
./mi-makefile.sh 1 > t
rm t