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 <tlyu@mit.edu>
master
Taylor Yu 2 years ago
parent 95ea4e3175
commit 0ac320baeb

@ -205,8 +205,8 @@ endif
$(info ) $(info )
@$(shell read _) @$(shell read _)
# If we have a device serial port available, try to trigger a Kaliedoscope reset # 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) && \ -$(QUIET) export DEVICE=$(shell $(ARDUINO_CLI) board list --format=text | grep $(FQBN) |cut -d' ' -f 1) && \
[ -e $$DEVICE ] && \ [ -e "$$DEVICE" ] && \
$(KALEIDOSCOPE_DIR)/bin/focus-send "device.reset" && \ $(KALEIDOSCOPE_DIR)/bin/focus-send "device.reset" && \
sleep 2 sleep 2
$(QUIET) $(ARDUINO_CLI) upload --fqbn $(FQBN) \ $(QUIET) $(ARDUINO_CLI) upload --fqbn $(FQBN) \

Loading…
Cancel
Save