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 )
@$(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) \

Loading…
Cancel
Save