aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/avr.mk
diff options
context:
space:
mode:
authorDanny Nguyen <danny@keeb.io>2018-01-25 16:36:01 -0500
committerJack Humbert <jack.humb@gmail.com>2018-02-08 15:15:12 -0500
commit361810dca80b31b2ba236df8fdea48b89fedfd4d (patch)
tree33f811b194eb605169584d1deb2c590fc84ceb2d /tmk_core/avr.mk
parent53ff8a31b61952d9675558149d927f7942071df9 (diff)
downloadqmk_firmware-361810dca80b31b2ba236df8fdea48b89fedfd4d.tar.gz
qmk_firmware-361810dca80b31b2ba236df8fdea48b89fedfd4d.zip
Only search through newly detected devices and discard ones that disappeared
Diffstat (limited to 'tmk_core/avr.mk')
-rw-r--r--tmk_core/avr.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index 24722736e..e11ba2e23 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -175,10 +175,11 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size
175 ls /dev/tty* > /tmp/1; \ 175 ls /dev/tty* > /tmp/1; \
176 echo -e "Detecting USB port, reset your controller now.\c"; \ 176 echo -e "Detecting USB port, reset your controller now.\c"; \
177 while [ -z $$USB ]; do \ 177 while [ -z $$USB ]; do \
178 sleep 1; \
179 echo -e ".\c"; \ 178 echo -e ".\c"; \
179 sleep 0.5; \
180 ls /dev/tty* > /tmp/2; \ 180 ls /dev/tty* > /tmp/2; \
181 USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ 181 USB=`comm -13 /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
182 mv /tmp/2 /tmp/1; \
182 done; \ 183 done; \
183 echo ""; \ 184 echo ""; \
184 echo "Detected controller on USB port at $$USB"; \ 185 echo "Detected controller on USB port at $$USB"; \