diff --git a/Arduino/CanGrow/cangrow.sh b/Arduino/CanGrow/cangrow.sh index d00c4e4..981c441 100755 --- a/Arduino/CanGrow/cangrow.sh +++ b/Arduino/CanGrow/cangrow.sh @@ -60,14 +60,14 @@ case $1 in read echo "" echo ":: Installing Arduino IDE packages with apt, please enter sudo password:" - sudo apt update - sudo apt install arduino python3 python3-serial wget curl xxd + sudo apt update || exit 1 + sudo apt install arduino python3 python3-serial wget curl xxd || exit 1 echo ":: Ensure directory ${ACLI_DIR} is present" test -d ${ACLI_DIR} || mkdir -p ${ACLI_DIR} echo ":: Please ensure ${ACLI_DIR} is in your \$PATH, I wont do it." echo "" echo ":: Downloading arduino-cli 1.0.0 into ${ACLI_DIR}/" - wget -O - "https://github.com/arduino/arduino-cli/releases/download/v1.0.0/arduino-cli_1.0.0_Linux_64bit.tar.gz" | tar -C ${ACLI_DIR} -zxvf - arduino-cli + wget -O - "https://github.com/arduino/arduino-cli/releases/download/v1.0.4/arduino-cli_1.0.4_Linux_64bit.tar.gz" | tar -C ${ACLI_DIR} -zxvf - arduino-cli chmod +x ${ACLI} echo "" echo ":: Installing ESP8266 and ESP32 cores for Arduino" @@ -76,7 +76,7 @@ case $1 in ${ACLI_CMD} core install ${CORES[$core]} done echo ":: Installing Arduino libraries" - ${ACLI_CMD} lib update-index + ${ACLI_CMD} lib update-index || exit 1 for lib in ${!LIBS[@]} do echo " - ${LIBS[$lib]}" @@ -84,7 +84,7 @@ case $1 in for lib in ${!LIBS[@]} do - ${ACLI_CMD} lib install "${LIBS[$lib]}" + ${ACLI_CMD} lib install "${LIBS[$lib]}" || exit 1 done echo "" echo ":: Setup build environment done! You can now build the firmware"