diff --git a/firmware/bin/upload_bundle.sh b/firmware/bin/upload_bundle.sh index 97ce220a55..a975a62b02 100755 --- a/firmware/bin/upload_bundle.sh +++ b/firmware/bin/upload_bundle.sh @@ -5,20 +5,21 @@ PASS=$2 HOST=$3 BUNDLE_FILE_NAME=$4 -if [ -n "${BUNDLE_FILE_NAME}" ]; then - echo "BUNDLE_FILE_NAME is ${BUNDLE_FILE_NAME}" -else - echo "BUNDLE_FILE_NAME argument not specified" - exit 1 -fi - SCRIPT_NAME=$(basename "$0") -# technical debt: more than one file uses magic 'rusefi_bundle_' constant, can we extract constant? -FULL_BUNDLE_FILE="rusefi_bundle_${BUNDLE_FILE_NAME}.zip" -UPDATE_BUNDLE_FILE="rusefi_bundle_${BUNDLE_FILE_NAME}_autoupdate.zip" if [ -n "${USER}" -a -n "$PASS" -a -n "${HOST}" ]; then echo "$SCRIPT_NAME: Uploading both bundles" + + if [ -n "${BUNDLE_FILE_NAME}" ]; then + echo "BUNDLE_FILE_NAME is ${BUNDLE_FILE_NAME}" + else + echo "BUNDLE_FILE_NAME argument not specified" + exit 1 + fi + # technical debt: more than one file uses magic 'rusefi_bundle_' constant, can we extract constant? + FULL_BUNDLE_FILE="rusefi_bundle_${BUNDLE_FILE_NAME}.zip" + UPDATE_BUNDLE_FILE="rusefi_bundle_${BUNDLE_FILE_NAME}_autoupdate.zip" + RET=0 if [ "$LTS" == "true" -a -n "$REF" ]; then DESTINATION_FOLDER="build_server/lts/${REF}"