chiark / gitweb /
Merge pull request #1082 from Dim3nsioneer/TweakAtZ-DEV
[cura.git] / package.sh
index c1dd3947e6bf2d7b0a9ad2a0e1bbe8ded04b6662..018d895219704a001ddb666efc451394d602f33c 100755 (executable)
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+set -e
+set -u
+
 # This script is to package the Cura package for Windows/Linux and Mac OS X
 # This script should run under Linux and Mac OS X, as well as Windows with Cygwin.
 
@@ -26,7 +29,7 @@ TARGET_DIR=Cura-${BUILD_NAME}-${BUILD_TARGET}
 WIN_PORTABLE_PY_VERSION=2.7.2.1
 
 ##Which CuraEngine to use
-if [ -z ${CURA_ENGINE_REPO} ] ; then
+if [ -z ${CURA_ENGINE_REPO:-} ] ; then
        CURA_ENGINE_REPO="git@github.com:Ultimaker/CuraEngine.git"
 fi
 
@@ -136,6 +139,11 @@ else
        ARDUINO_VERSION=105
 fi
 
+if [ ! -d "$ARDUINO_PATH" ]; then
+  echo "Arduino path '$ARDUINO_PATH' doesn't exist"
+  exit 1
+fi
+
 #Build the Ultimaker Original firmwares.
 gitClone git@github.com:Ultimaker/Marlin.git _UltimakerMarlin
 cd _UltimakerMarlin/Marlin