aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/lets_split/rules.mk
diff options
context:
space:
mode:
authorGravatar Nic Aitch <nic@nicinabox.com>2017-02-06 19:57:34 -0600
committerGravatar Nic Aitch <nic@nicinabox.com>2017-02-06 19:57:34 -0600
commit3dbdd153040087f23d63204b142f355936ae8bc0 (patch)
treeb08714e90a9d03defbe7a428c1edf97ba2f57505 /keyboards/lets_split/rules.mk
parentd4c88626bd7a7c370969392a1cbbf2381547a028 (diff)
downloadqmk_firmware-3dbdd153040087f23d63204b142f355936ae8bc0.tar.gz
Check for a new serial port every second
Diffstat (limited to 'keyboards/lets_split/rules.mk')
-rw-r--r--keyboards/lets_split/rules.mk10
1 files changed, 6 insertions, 4 deletions
diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk
index 0dc549130..0efa78550 100644
--- a/keyboards/lets_split/rules.mk
+++ b/keyboards/lets_split/rules.mk
@@ -76,10 +76,12 @@ CUSTOM_MATRIX = yes
avrdude: build
ls /dev/tty* > /tmp/1; \
- echo "Reset your Pro Micro then hit any key to continue..."; \
- read -n 1 -s; \
- ls /dev/tty* > /tmp/2; \
- USB=`diff /tmp/1 /tmp/2 | grep '>' | sed -e 's/> //'`; \
+ echo "Reset your Pro Micro now"; \
+ while [[ -z $$USB ]]; do \
+ sleep 1; \
+ ls /dev/tty* > /tmp/2; \
+ USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
+ done; \
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
.PHONY: avrdude