X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Favr.mk;h=e11ba2e23e79a1a8f52cccf8e862b39b19d9e261;hb=361810dca80b31b2ba236df8fdea48b89fedfd4d;hp=24722736ee9f1ed3662cc48f0790d79f0df6eda9;hpb=53ff8a31b61952d9675558149d927f7942071df9;p=qmk_firmware.git 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 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"; \