From 5b808f1eb8a64e3dd01a26c6bf564a1a9ecd3e8c Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 24 Oct 2017 23:38:15 -0700 Subject: [PATCH] This may or may not work. Trying to simplify the platform detection logic --- etc/kaleidoscope-builder.conf | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/etc/kaleidoscope-builder.conf b/etc/kaleidoscope-builder.conf index cebe8660..6cc54dbc 100644 --- a/etc/kaleidoscope-builder.conf +++ b/etc/kaleidoscope-builder.conf @@ -36,6 +36,11 @@ DEVICE_PORT="$(ls /dev/ttyACM* 2>/dev/null || echo '')" RESET_DEVICE="stty -F ${DEVICE_PORT} 1200 hupcl" MD5="md5sum" +find_bootloader_ports() { + DEVICE_PORT_BOOTLOADER="$(ls /dev/ttyACM* 2>/dev/null || echo '')" +} + + if [ "${uname_S}" = "Darwin" ]; then DEVICE_PORT="$(ls /dev/cu.usbmodemkbio* 2> /dev/null || echo '')" @@ -52,18 +57,13 @@ if [ "${uname_S}" = "Darwin" ]; then MD5="md5" + find_bootloader_ports() { + DEVICE_PORT_BOOTLOADER="$(ls /dev/cu.usbmodemkbio* 2> /dev/null || echo '')" + DEVICE_PORT_BOOTLOADER="${DEVICE_PORT_BOOTLOADER:-$(ls /dev/cu.usbmodem14* 2> /dev/null || echo '')}" + } + fi -find_bootloader_ports() { - -DEVICE_PORT_BOOTLOADER="$(ls /dev/ttyACM* 2>/dev/null || echo '')" -if [ "${uname_S}" = "Darwin" ]; then - DEVICE_PORT_BOOTLOADER="$(ls /dev/cu.usbmodemkbio* 2> /dev/null || echo '')" - DEVICE_PORT_BOOTLOADER="${DEVICE_PORT_BOOTLOADER:-$(ls /dev/cu.usbmodem14* 2> /dev/null || echo '')}" -fi - - -} ######