diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-02-07 13:52:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 13:52:03 -0500 |
commit | d639bd2021b697849bb11e521fc142292ab7e023 (patch) | |
tree | d7f5fc357e19a4fc7c365f021dac567902b0aa76 /keyboards/lets_split/rules.mk | |
parent | 42ea912fde12233d1fc39b9a9b3720d7ce418437 (diff) | |
parent | 3dbdd153040087f23d63204b142f355936ae8bc0 (diff) |
Merge pull request #1072 from nicinabox/improve-ls-avrdude-target
Check for Pro Micro serial port automatically
Diffstat (limited to 'keyboards/lets_split/rules.mk')
-rw-r--r-- | keyboards/lets_split/rules.mk | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index 0dc5491302..0efa785505 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 |