-
Notifications
You must be signed in to change notification settings - Fork 0
/
launch.sh
executable file
·37 lines (33 loc) · 894 Bytes
/
launch.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
#!/bin/bash
version=$1
export return_code=0
if [ $1 = "build" ] ; then
echo "<-- using build command of the cmake -->"
cd build
cmake .. -G "Unix Makefiles" -DCMAKE_MODULE_PATH=/usr/local/bugs/run/cmake_modules/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=.
cmake --build .
return_code=$?
cp ./bomberman ../
cd ../
if [ $return_code != 0 ] ; then
echo "--> build failed: make do not compil"
fi
exit $return_code
fi
if [ $1 = "make" ] ; then
echo "<-- using make command of the makefile -->"
cd build;
make
return_code=$?
cp ./bomberman ../
cd ../
if [ $return_code != 0 ] ; then
echo "--> build failed: make do not compil"
fi
exit $return_code
fi
if [ $1 = "clear" ] ; then
echo "<-- clearing project -->"
rm -rf build/* ; touch build/.gitkeep ; rm bomberman
exit 0
fi