-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild
More file actions
32 lines (27 loc) · 1.1 KB
/
Copy pathbuild
File metadata and controls
32 lines (27 loc) · 1.1 KB
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
#!/bin/bash
set +x
cd c_programs
echo -e "\n\n**************************** This is a Build JOB **************************** "
if [[ -x "ABC.exe" ]]; then
echo "STEP 1: Cleaning existing builds ........"
ls *.exe | nl | sed 's/ /) /g' | tr '\n' ' '
rm -f "./ABC.exe"
echo -e "\n\nSTEP 2: Cleaning existing Object files........"
ls *.o | nl | sed 's/ /) /g' | tr '\n' ' '
rm -f *.o
fi
echo -e "\n\nSTEP 3: Initiating Build for below files (using make)........"
ls *.c | nl | sed 's/ /) /g' | tr '\n' ' '
echo -e "\n"
make
#dt=$(date +%Y-%m-%d_%H:%M:%S)
if [[ -x "./ABC.exe" ]]; then
echo -e "\nSTEP 4: Build Successful"
echo " BUILD_FILE: $(pwd)/ABC.exe"
else
echo -e "**************** ERROR *********************\n"
echo "Build failure - No executable file generated"
echo -e "********************************************\n"
exit 1
fi
echo -e "\n************************************************************************** "