summaryrefslogtreecommitdiff
path: root/tools/autobuild/autobuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/autobuild/autobuild.sh')
-rwxr-xr-xtools/autobuild/autobuild.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/autobuild/autobuild.sh b/tools/autobuild/autobuild.sh
index 9c94d887f..ed748fc01 100755
--- a/tools/autobuild/autobuild.sh
+++ b/tools/autobuild/autobuild.sh
@@ -7,6 +7,9 @@
# - IDF_PATH_V50 must be set
# - MICROPY_AUTOBUILD_MICROPYTHON_REPO must be set to location of micropython repository
# - MICROPY_AUTOBUILD_MAKE must be set to the make command to use, eg "make -j2"
+# - MICROPY_AUTOBUILD_DEST must be set to a directory name to place the output firmware
+# (this directory will be created, and removed at the end if firmware is copied to a
+# remote machine using MICROPY_AUTOBUILD_REMOTE_MACHINE and MICROPY_AUTOBUILD_REMOTE_DIR)
#
# Optional settings:
# - MICROPY_AUTOBUILD_REMOTE_MACHINE can be set to a remote ssh machine to copy files to
@@ -27,6 +30,11 @@ if [ -z "$MICROPY_AUTOBUILD_MAKE" ]; then
exit 1
fi
+if [ -z "$MICROPY_AUTOBUILD_DEST" ]; then
+ echo "must set MICROPY_AUTOBUILD_DEST"
+ exit 1
+fi
+
########################################
# Initialisation
@@ -37,7 +45,7 @@ AUTODIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source ${AUTODIR}/build-boards.sh
# make local directory to put firmware
-LOCAL_FIRMWARE=/tmp/autobuild-firmware-$$
+LOCAL_FIRMWARE=${MICROPY_AUTOBUILD_DEST}
mkdir -p ${LOCAL_FIRMWARE}
# get latest MicroPython