* Minimal error checks on build-mg.sh

This commit is contained in:
mnaumann 2011-10-18 12:36:44 +00:00
parent c40ca18966
commit 8b345b4316
1 changed files with 16 additions and 5 deletions

View File

@ -5,13 +5,24 @@ NUMCORES=`cat /proc/cpuinfo | grep -cE '^processor'`
mkdir -p build mkdir -p build
cd build cd build
[[ -f "CMakeCache.txt" ]] && rm -f "CMakeCache.txt" if [ -f 'CMakeCache.txt' ]; then rm -f 'CMakeCache.txt'; fi
# This is for regular developers and used by our installer # This is for regular developers and used by our installer
cmake -DCMAKE_INSTALL_PREFIX= -DWANT_STATIC_LIBS=ON .. cmake -DCMAKE_INSTALL_PREFIX= -DWANT_STATIC_LIBS=ON ..
if [ $? -ne 0 ]; then
echo 'ERROR: CMAKE failed.' >&2; exit 1
fi
make -j$NUMCORES make -j$NUMCORES
if [ $? -ne 0 ]; then
echo 'ERROR: MAKE failed.' >&2; exit 2
fi
cd .. cd ..
echo 'You may now launch MegaGlest from this directory like this:' echo ''
echo 'mk/linux/megaglest --ini-path=mk/linux/ --data-path=mk/linux/' echo 'BUILD COMPLETE.'
echo 'or from within the build directory:' echo ''
echo '../mk/linux/megaglest --ini-path=../mk/linux/ --data-path=../mk/linux/' echo 'To launch MegaGlest from the current directory, use:'
echo ' mk/linux/megaglest --ini-path=mk/linux/ --data-path=mk/linux/'
echo 'To launch MegaGlest from within the build directory, use:'
echo ' ../mk/linux/megaglest --ini-path=../mk/linux/ --data-path=../mk/linux/'