X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Favr.mk;h=106b771507a2ee2e3e18528d4ecf9759ba766498;hb=2c1ba03a989bd87613e4e35f94d85daba6015c0a;hp=24722736ee9f1ed3662cc48f0790d79f0df6eda9;hpb=9bfaf66792310fae2d525633b280b354babca026;p=qmk_firmware.git diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 24722736e..106b77150 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -172,13 +172,14 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size if grep -q -s Microsoft /proc/version; then \ echo 'ERROR: AVR flashing cannot be automated within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \ else \ + printf "Detecting USB port, reset your controller now."; \ 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; \ + printf "."; \ 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"; \