forked from meganutexas/Pintos_Testing_Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile
More file actions
33 lines (29 loc) · 677 Bytes
/
compile
File metadata and controls
33 lines (29 loc) · 677 Bytes
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
echo ''
echo -e '\e[0;34mCOMPILING...\e[0m'
make > make_output.txt 2>&1
DONE=$(grep -c "make: Nothing to be done" make_output.txt)
if [[ $DONE == 1 ]];then
echo -e '\e[0;33mFILES UP TO DATE\e[0m'
else
{
if [[ $# > 0 ]]; then
{
echo '--------------------------------------------------------------'
echo -e '\e[0;33mWARNINGS:\e[0m'
grep -n warning make_output.txt
echo '--------------------------------------------------------------'
}
fi
NUM=$(grep -c error make_output.txt)
if [[ $NUM == 0 ]]; then
echo -e '\e[0;32mNO COMPILE ERRORS!\e[0m'
else
{
echo -e '\e[0;31mERRORS:\e[0m'
grep -n error make_output.txt
}
fi
}
fi
rm make_output.txt
echo ''