diff --git a/flash_FP3_factory.sh b/flash_FP3_factory.sh index 33157d72a2b09c99b95a6200cd1d47f12023d6fd..09e9eefa92ea0b9403be593620975e62517ac6f6 100755 --- a/flash_FP3_factory.sh +++ b/flash_FP3_factory.sh @@ -150,8 +150,21 @@ flash_image_ab_or_abort() { # Operating system checks and variable definition os_checks() { - echo "INFO: You are using a Linux distribution." - FASTBOOT_BIN="${ROOT_DIR}/bin-linux-x86/fastboot" + case "$(uname -s 2> /dev/null)" in + Linux|GNU/Linux) + echo "INFO: You are using a Linux distribution." + FASTBOOT_BIN="${ROOT_DIR}/bin-linux-x86/fastboot" + ;; + msys|MINGW*) + echo "INFO: You are using MinGW on Windows" + FASTBOOT_BIN="${ROOT_DIR}/bin-msys/fastboot.exe" + ;; + *) + echo "ERROR: Unsupported operating system (${OSTYPE})." + echo "ERROR: Only GNU/Linux, and MinGW on Windows are currently supported." + abort_now + ;; + esac } diff --git a/flash_FP4_factory.sh b/flash_FP4_factory.sh index e71e586a89246f4f8d2f0a9be81812e417c67042..1a7cc1093281b4691ab318d4f74dc5943a8c44dc 100755 --- a/flash_FP4_factory.sh +++ b/flash_FP4_factory.sh @@ -146,8 +146,21 @@ flash_image_ab_or_abort() { # Operating system checks and variable definition os_checks() { - echo "INFO: You are using a Linux distribution." - FASTBOOT_BIN="${ROOT_DIR}/bin-linux-x86/fastboot" + case "$(uname -s 2> /dev/null)" in + Linux|GNU/Linux) + echo "INFO: You are using a Linux distribution." + FASTBOOT_BIN="${ROOT_DIR}/bin-linux-x86/fastboot" + ;; + msys|MINGW*) + echo "INFO: You are using MinGW on Windows" + FASTBOOT_BIN="${ROOT_DIR}/bin-msys/fastboot.exe" + ;; + *) + echo "ERROR: Unsupported operating system (${OSTYPE})." + echo "ERROR: Only GNU/Linux, and MinGW on Windows are currently supported." + abort_now + ;; + esac } # Control the reboot sequence