Merge pull request #10 from bigfish3000/master
The detail bash script for building drogon
This commit is contained in:
commit
51a4e5b2f6
55
build.sh
55
build.sh
|
@ -1,6 +1,49 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
git submodule update --init
|
|
||||||
mkdir build
|
#building drogon
|
||||||
cd build
|
function build_drogon() {
|
||||||
cmake ..
|
|
||||||
make
|
#update the submodule and initialize
|
||||||
|
git submodule update --init
|
||||||
|
|
||||||
|
#saving current directory
|
||||||
|
current_dir="${PWD}"
|
||||||
|
|
||||||
|
#the folder we will build
|
||||||
|
build_dir='./build'
|
||||||
|
if [ -d $build_dir ]; then
|
||||||
|
echo "Deleted folder: ${build_dir}"
|
||||||
|
rm -rf $build_dir
|
||||||
|
fi
|
||||||
|
|
||||||
|
#creating building folder
|
||||||
|
echo "Created building folder: ${build_dir}"
|
||||||
|
mkdir $build_dir
|
||||||
|
|
||||||
|
echo "Entering folder: ${build_dir}"
|
||||||
|
cd $build_dir
|
||||||
|
|
||||||
|
echo "Start building drogon ..."
|
||||||
|
cmake ..
|
||||||
|
|
||||||
|
#errors exit
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
#errors exit
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing header files ..."
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
#reback current directory
|
||||||
|
cd $current_dir
|
||||||
|
#ok!
|
||||||
|
}
|
||||||
|
|
||||||
|
build_drogon
|
||||||
|
|
Loading…
Reference in New Issue