From 0ac320baeb99d6fe803acef5d035a6d5a20f2bf1 Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Sun, 2 Oct 2022 15:13:04 -0500 Subject: [PATCH] export DEVICE so sketch Makefile works again The setting of `DEVICE` wouldn't make it into the environment without being exported. Also add quoting. Signed-off-by: Taylor Yu --- etc/makefiles/sketch.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/makefiles/sketch.mk b/etc/makefiles/sketch.mk index 4f3a5300..99c00789 100644 --- a/etc/makefiles/sketch.mk +++ b/etc/makefiles/sketch.mk @@ -205,8 +205,8 @@ endif $(info ) @$(shell read _) # If we have a device serial port available, try to trigger a Kaliedoscope reset - -$(QUIET) DEVICE=$(shell $(ARDUINO_CLI) board list --format=text | grep $(FQBN) |cut -d' ' -f 1) && \ - [ -e $$DEVICE ] && \ + -$(QUIET) export DEVICE=$(shell $(ARDUINO_CLI) board list --format=text | grep $(FQBN) |cut -d' ' -f 1) && \ + [ -e "$$DEVICE" ] && \ $(KALEIDOSCOPE_DIR)/bin/focus-send "device.reset" && \ sleep 2 $(QUIET) $(ARDUINO_CLI) upload --fqbn $(FQBN) \