From d97b2060baf504b33eebc4c8df912c2b8df1b981 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 23 Aug 2018 22:51:57 -0700 Subject: [PATCH] The previous factoring just didn't work --- bin/kaleidoscope-builder | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index 1642471b..c7013306 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -104,7 +104,7 @@ flash () { reset_device sleep 3s find_bootloader_ports - check_bootloader_port || ( flash_over_usb || flash_over_usb) + check_bootloader_port_and_flash # This is defined in the (optional) user config. # shellcheck disable=SC2154 @@ -112,12 +112,12 @@ flash () { } -check_bootloader_port () { +check_bootloader_port_and_flash () { if [ -z "${DEVICE_PORT_BOOTLOADER}" ]; then echo "Unable to detect a keyboard in bootloader mode. You may need to hold the 'Prog' key or hit a reset button" return 1 fi - + flash_over_usb || flash_over_usb } flash_over_usb () { @@ -128,7 +128,7 @@ flash_over_usb () { flash_from_bootloader() { prepare_to_flash find_bootloader_ports - check_bootloader_port || ( flash_over_usb || flash_over_usb) + check_bootloader_port_and_flash } program() {