This may or may not work. Trying to simplify the platform detection logic

pull/264/head
Jesse Vincent 7 years ago committed by Gergely Nagy
parent 040287a203
commit 5b808f1eb8

@ -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
}
######

Loading…
Cancel
Save