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