From 6d1b9419e2a62937946a3f9395b5a67bf6579a2a Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 12 Nov 2020 11:33:17 -0800 Subject: [PATCH] move virtual arch compiler customization into where we set executable paths --- bin/kaleidoscope-builder | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index f7251d92..be0d9e47 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -118,6 +118,16 @@ _set_executable_paths() { ###### Executable paths ###### + if [ "${ARCH}" = "virtual" ]; then + if [ "${uname_S}" = "FreeBSD" ]; then + : "${COMPILER_PATH:=/usr/local/bin/}" + else + : "${COMPILER_PATH:=/usr/bin/}" + fi + COMPILER_PREFIX="" + fi + + # Allow the compiler path to be empty for virtual builds # should use compiler.path instead of appending bin, but we don't have substitution het : "${COMPILER_PATH=$(_arduino_prop 'runtime.tools.avr-gcc.path')/bin}" @@ -442,7 +452,6 @@ else ARDUINO_VERBOSE="--quiet" fi - if [[ -z "${ARCH}" && -n "${FQBN}" ]]; then ARCH=$(echo "${FQBN}" | sed -n -e 's/^[^:]\+:\([^:]\+\).*/\1/p') fi @@ -451,15 +460,6 @@ fi : "${ARCH:=avr}" : "${FQBN:=keyboardio:${ARCH}:${BOARD}}" -if [ "${ARCH}" = "virtual" ]; then - if [ "${uname_S}" = "FreeBSD" ]; then - : "${COMPILER_PATH:=/usr/local/bin/}" - else - : "${COMPILER_PATH:=/usr/bin/}" - fi - - COMPILER_PREFIX="" -fi if [ $# -eq 2 ]; then