changeset 394:0d96d2bbf225

Merge pull request #65 from r4v5/exit-quickly-on-script-error Exit quickly when cmake or make fail
author Jacob Alexander <haata@kiibohd.com>
date Sun, 18 Oct 2015 17:54:41 -0700
parents 36b047a5afb0 (current diff) 4ca343d30b73 (diff)
children e581daa76a14 9ec758fc2e1f 99f93dec8fea
files
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Keyboards/cmake.bash	Sat Oct 17 21:03:07 2015 -0700
+++ b/Keyboards/cmake.bash	Sun Oct 18 17:54:41 2015 -0700
@@ -82,7 +82,18 @@
 mkdir -p "${BuildPath}"
 cd "${BuildPath}"
 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
+return_code=$?
+if [ $return_code != 0 ] ; then
+  echo "Error in make. Exiting..."
+  exit $return_code
+fi
 
 echo "Firmware has been compiled into: '${BuildPath}'"
 cd -