ttrts/bootstrap.sh

35 lines
637 B
Bash
Raw Normal View History

#! /bin/bash
# Double check for cmakelist
if [ ! -e "CMakeLists.txt" ]; then
echo "TTRTS: No source cmakelist found"
exit
fi
# Run cmake
echo "TTRTS: Running cmake"
2014-12-16 22:35:58 +00:00
test ! -e build && mkdir build
cd build/
cmake ..
if [[ $? != 0 ]]; then
echo "TTRTS: CMake failed, exiting Bootstrap"
exit
fi
echo "Performing install"
sudo make install
if [[ $? != 0 ]]; then
echo "TTRTS: Install failed, check output"
exit
fi
# Run final test to make sure
echo "TTRTS: Running tests"
./source/test/ttrts-test
if [[ $? != 0 ]]; then
echo "TTRTS: Tests failed, build must be broken"
exit
fi
echo "TTRTS: Bootstrap complete"