From 59bb9a63f893f626dd10d6f8aabb83d41ed95e49 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 28 Feb 2019 18:02:05 -0800 Subject: [PATCH] Switch back to stable build paths to take advantage of Arduino's build caching Signed-off-by: Jesse Vincent --- bin/kaleidoscope-builder | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index e36b6007..435c9676 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -26,12 +26,16 @@ build_version () { } build_paths() { - BUILD_PATH="${BUILD_PATH:-"$(mktemp -d 2>/dev/null || mktemp -d -t 'build')"}" OUTPUT_DIR="${OUTPUT_DIR:-output/${LIBRARY}}" OUTPUT_PATH="${OUTPUT_PATH:-${SOURCEDIR}/${OUTPUT_DIR}}" STABLE_TEMP_DIR="${STABLE_TEMP_DIR:-/tmp/kaleidoscope-${USER}}" CORE_CACHE_PATH="${CORE_CACHE_PATH:-${STABLE_TEMP_DIR}/arduino-cores}" + + + BUILD_PATH="${BUILD_PATH:-${STABLE_TEMP_DIR}/${LIBRARY}}" + mkdir -p "$CORE_CACHE_PATH" + mkdir -p "$BUILD_PATH" } build_filenames () { @@ -255,8 +259,6 @@ compile () { if [ "${ARDUINO_VERBOSE}" = "-verbose" ]; then echo "Build artifacts can be found in ${BUILD_PATH}"; - else - rm -rf "${BUILD_PATH}" fi BOARD="${SAVED_BOARD}"