diff options
author | Danny Nguyen <danny@keeb.io> | 2018-01-25 16:36:01 -0500 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-02-08 15:15:12 -0500 |
commit | 361810dca80b31b2ba236df8fdea48b89fedfd4d (patch) | |
tree | 33f811b194eb605169584d1deb2c590fc84ceb2d | |
parent | 53ff8a31b61952d9675558149d927f7942071df9 (diff) | |
download | qmk_firmware-361810dca80b31b2ba236df8fdea48b89fedfd4d.tar.gz qmk_firmware-361810dca80b31b2ba236df8fdea48b89fedfd4d.zip |
Only search through newly detected devices and discard ones that disappeared
-rw-r--r-- | tmk_core/avr.mk | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 24722736ee..e11ba2e23e 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -175,10 +175,11 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size ls /dev/tty* > /tmp/1; \ echo -e "Detecting USB port, reset your controller now.\c"; \ while [ -z $$USB ]; do \ - sleep 1; \ echo -e ".\c"; \ + sleep 0.5; \ ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + USB=`comm -13 /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + mv /tmp/2 /tmp/1; \ done; \ echo ""; \ echo "Detected controller on USB port at $$USB"; \ |