summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-02-07 19:52:03 +0100
committerGitHub <noreply@github.com>2017-02-07 19:52:03 +0100
commitd639bd2021b697849bb11e521fc142292ab7e023 (patch)
treed7f5fc357e19a4fc7c365f021dac567902b0aa76
parent42ea912fde12233d1fc39b9a9b3720d7ce418437 (diff)
parent3dbdd153040087f23d63204b142f355936ae8bc0 (diff)
downloadqmk_firmware-d639bd2021b697849bb11e521fc142292ab7e023.tar.gz
qmk_firmware-d639bd2021b697849bb11e521fc142292ab7e023.tar.xz
Merge pull request #1072 from nicinabox/improve-ls-avrdude-target
Check for Pro Micro serial port automatically
-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