Merge pull request #65 from r4v5/exit-quickly-on-script-error
Exit quickly when cmake or make fail
This commit is contained in:
commit
7b7a55899f
@ -82,7 +82,18 @@ done
|
|||||||
mkdir -p "${BuildPath}"
|
mkdir -p "${BuildPath}"
|
||||||
cd "${BuildPath}"
|
cd "${BuildPath}"
|
||||||
cmake -DCHIP="${Chip}" -DCOMPILER="${Compiler}" -DScanModule="${ScanModule}" -DMacroModule="${MacroModule}" -DOutputModule="${OutputModule}" -DDebugModule="${DebugModule}" -DBaseMap="${BaseMap}" -DDefaultMap="${DefaultMap}" -DPartialMaps="${PartialMapsExpanded}" "${CMakeListsPath}"
|
cmake -DCHIP="${Chip}" -DCOMPILER="${Compiler}" -DScanModule="${ScanModule}" -DMacroModule="${MacroModule}" -DOutputModule="${OutputModule}" -DDebugModule="${DebugModule}" -DBaseMap="${BaseMap}" -DDefaultMap="${DefaultMap}" -DPartialMaps="${PartialMapsExpanded}" "${CMakeListsPath}"
|
||||||
|
return_code=$?
|
||||||
|
if [ $return_code != 0 ] ; then
|
||||||
|
echo "Error in cmake. Exiting..."
|
||||||
|
exit $return_code
|
||||||
|
fi
|
||||||
|
|
||||||
make
|
make
|
||||||
|
return_code=$?
|
||||||
|
if [ $return_code != 0 ] ; then
|
||||||
|
echo "Error in make. Exiting..."
|
||||||
|
exit $return_code
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Firmware has been compiled into: '${BuildPath}'"
|
echo "Firmware has been compiled into: '${BuildPath}'"
|
||||||
cd -
|
cd -
|
||||||
|
Reference in New Issue
Block a user