core-legacy/build.sh
2019-08-17 11:04:15 +02:00

35 lines
547 B
Bash
Executable file

current_dir="${PWD}"
#The folder in which we will build emgauwa
build_dir='./build'
if [ -d $build_dir ]; then
echo "Deleted folder: ${build_dir}"
rm -rf $build_dir
fi
#Create building folder
echo "Created building folder: ${build_dir}"
mkdir $build_dir
echo "Entering folder: ${build_dir}"
cd $build_dir
echo "Start building emgauwa ..."
cmake ..
#If errors then exit
if [ "$?" != "0" ]; then
exit -1
fi
make
#If errors then exit
if [ "$?" != "0" ]; then
exit -1
fi
cp core /bin/
mkdir /srv/core
cp config.json /srv/core