]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Keyboards/cmake.bash
Exit quickly when cmake or make fail
[kiibohd-controller.git] / Keyboards / cmake.bash
index 91425261de27434517e2e5f77593194ba86063e2..3a1b6e49be1417c95f86fd796309ac67adc925a4 100644 (file)
@@ -82,7 +82,18 @@ done
 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 -