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,3 +1,5 @@
set -e
SCRIPT_REL_DIR=$(dirname "${BASH_SOURCE[0]}")
$SCRIPT_REL_DIR/build_.sh debug osx arm64
# $SCRIPT_REL_DIR/build_.sh debug wasm intel

View File

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