From 02faf0d8424fa0f7928a56eecf62353e4e921997 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Fri, 1 Mar 2019 16:07:12 -0800 Subject: [PATCH] Refactor our directory environment variables to make it easier to set a global place to stash your compiled output Signed-off-by: Jesse Vincent --- bin/kaleidoscope-builder | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index cf3f826b..c2e4bcbb 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -29,13 +29,19 @@ build_paths() { SKETCH_IDENTIFIER=$(ls -id $(realpath "$(find_sketch)/${SKETCH}.ino") | cut -d ' ' -f 1)"-${SKETCH}.ino" KALEIDOSCOPE_TEMP_PATH="${KALEIDOSCOPE_TEMP_PATH:-${TMPDIR:-/tmp}/kaleidoscope-${USER}}" - SKETCH_TEMP_PATH="${KALEIDOSCOPE_TEMP_PATH}/sketch/${SKETCH_IDENTIFIER}" - BUILD_PATH="${BUILD_PATH:-${SKETCH_TEMP_PATH}/build}" - OUTPUT_PATH="${OUTPUT_PATH:-${SKETCH_TEMP_PATH}/output}" + + + KALEIDOSCOPE_BUILD_PATH="${KALEIDOSCOPE_BUILD_PATH:-${KALEIDOSCOPE_TEMP_PATH}/sketch}" + KALEIDOSCOPE_OUTPUT_PATH="${KALEIDOSCOPE_OUTPUT_PATH:-${KALEIDOSCOPE_TEMP_PATH}/sketch}" + + SKETCH_OUTPUT_DIR="${SKETCH_OUTPUT_DIR:-${SKETCH_IDENTIFIER}/output}" + SKETCH_BUILD_DIR="${SKETCH_BUILD_DIR:-${SKETCH_IDENTIFIER}/build}" + + BUILD_PATH="${BUILD_PATH:-${KALEIDOSCOPE_BUILD_PATH}/${SKETCH_BUILD_DIR}}" + OUTPUT_PATH="${OUTPUT_PATH:-${KALEIDOSCOPE_OUTPUT_PATH}/${SKETCH_OUTPUT_DIR}}" + CCACHE_WRAPPER_PATH="${CCACHE_WRAPPER_PATH:-${KALEIDOSCOPE_TEMP_PATH}/ccache/bin}" CORE_CACHE_PATH="${CORE_CACHE_PATH:-${KALEIDOSCOPE_TEMP_PATH}/arduino-cores}" - - mkdir -p "$CORE_CACHE_PATH" mkdir -p "$BUILD_PATH"