Add bootstrap script to generate build files, binaries, run tests and generate maps

This commit is contained in:
Marc Di Luzio 2014-12-16 13:13:03 +00:00
parent 572bc39ecf
commit e001396744

36
bootstrap.sh Executable file
View file

@ -0,0 +1,36 @@
#! /bin/bash
echo "TTRTS: Running cmake"
cd build/
cmake ../source
if [[ $? != 0 ]]; then
echo "TTRTS: CMake failed, exiting Bootstrap"
fi
echo "TTRTS: Running make"
make
if [[ $? != 0 ]]; then
echo "TTRTS: make failed, exiting Bootstrap"
fi
echo "TTRTS: Running tests"
./test/ttrts-test
if [[ $? != 0 ]]; then
echo "TTRTS: Tests failed, build must be broken"
fi
echo "TTRTS: Generating maps"
cd ../games
./../build/gen/ttrts-gen
if [[ $? != 0 ]]; then
echo "TTRTS: Generating maps, exiting Bootstrap"
fi
echo "TTRTS: Moving binaries"
cd ..
if [ ! -e build/ttrts/ttrts ]; then
echo "TTRTS: No TTRTS Binary found, something has gone wrong"
fi
cp build/ttrts/ttrts .
chmod a+x ttrts