#!/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.
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
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