Cache the arduino prefs lookup

pull/815/head
Jesse Vincent 5 years ago
parent 09da0477d9
commit 20315ac722
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -70,7 +70,9 @@ get_arduino_pref() {
dump_arduino_prefs() {
# SKETCH and -build-path in this command are here because of a bug introduced in Arduino 1.8.10
# https://github.com/arduino/arduino-builder/issues/341
prefs=$("${ARDUINO_BUILDER}" \
if [ "x${_ARDUINO_PREFS}x" == "xx" ]; then
_ARDUINO_PREFS=$("${ARDUINO_BUILDER}" \
-hardware "${ARDUINO_PATH}/hardware" \
-hardware "${BOARD_HARDWARE_PATH}" \
${ARDUINO_TOOLS_FLAG:+"${ARDUINO_TOOLS_FLAG}"} ${ARDUINO_TOOLS_PARAM:+"${ARDUINO_TOOLS_PARAM}"} \
@ -78,7 +80,8 @@ dump_arduino_prefs() {
-fqbn "${FQBN}" \
-build-path "${ARDUINO_PATH}" \
-dump-prefs "${SKETCH_DIR}/${SKETCH}.ino" )
echo "$prefs"
fi
echo "$_ARDUINO_PREFS"
}

Loading…
Cancel
Save