Make build fail correctly on error

This commit is contained in:
Cameron Tacklind 2022-08-10 12:52:23 -07:00
parent d2c3ae6fb7
commit 963c764ce0
2 changed files with 8 additions and 3 deletions

View File

@ -1,7 +1,9 @@
set -e
SCRIPT_REL_DIR=$(dirname "${BASH_SOURCE[0]}") SCRIPT_REL_DIR=$(dirname "${BASH_SOURCE[0]}")
$SCRIPT_REL_DIR/build_.sh debug osx arm64 $SCRIPT_REL_DIR/build_.sh debug osx arm64
# $SCRIPT_REL_DIR/build_.sh debug wasm intel # $SCRIPT_REL_DIR/build_.sh debug wasm intel
# pushd "run_tree/raspi/arm64/debug" # pushd "run_tree/raspi/arm64/debug"
# clang -o lumenarium /home/pi/dev/Lumenarium/src_v2/platform/raspi/lumenarium_first_raspi.c -lm # clang -o lumenarium /home/pi/dev/Lumenarium/src_v2/platform/raspi/lumenarium_first_raspi.c -lm
# popd # popd

View File

@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
# Ensure an error makes the script bail
set -e
# -------------------------------------------- # --------------------------------------------
# Usage # Usage
@ -330,8 +333,8 @@ echo "Building To: ${BuildDir}/${LinkerOutput}"
echo echo
pushdir $BuildDir pushdir $BuildDir
rm ${CompilerOutput} 2> /dev/null echo "Cleaning: ${CompilerOutput} and ${LinkerOutput}"
rm ${LinkerOutput} 2> /dev/null rm -rf ${CompilerOutput} ${LinkerOutput}
echo "COMPILING..." echo "COMPILING..."
if [ $PLATFORM == "win32" ] if [ $PLATFORM == "win32" ]