From fd70aee905c025fa0a96fcfe42d69b6de6e765e2 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Mon, 23 Mar 2020 16:22:10 -0500 Subject: [PATCH] Use boardname vs device name for shellball determination Signed-off-by: Matt DeVillier --- firmware.sh | 8 ++++---- functions.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/firmware.sh b/firmware.sh index 60be788..3c28960 100644 --- a/firmware.sh +++ b/firmware.sh @@ -605,14 +605,14 @@ Connect the USB/SD device which contains the backed-up stock firmware and press else if [[ "$hasShellball" = false ]]; then - exit_red "\nUnfortunately I don't have a stock firmware available to download for '${device^^}' at this time." + exit_red "\nUnfortunately I don't have a stock firmware available to download for '${boardName^^}' at this time." return 1 fi #download firmware extracted from recovery image echo_yellow "\nThat's ok, I'll download a shellball firmware for you." - if [ "${device^^}" = "PANTHER" ]; then + if [ "${boardName^^}" = "PANTHER" ]; then echo -e "Which device do you have?\n" echo "1) Asus CN60 [PANTHER]" echo "2) HP CB1 [ZAKO]" @@ -651,7 +651,7 @@ else #confirm device detection echo_yellow "Confirm system details:" echo -e "Device: ${deviceDesc}" - echo -e "Board Name: ${device^^}" + echo -e "Board Name: ${boardName^^}" echo -e "" read -ep "? [y/N] " if [[ "$REPLY" != "y" && "$REPLY" != "Y" ]]; then @@ -659,7 +659,7 @@ else return 1 fi echo -e "" - _device=${device} + _device=${boardName,,} fi #download shellball ROM diff --git a/functions.sh b/functions.sh index 81b225e..1076b94 100644 --- a/functions.sh +++ b/functions.sh @@ -615,7 +615,7 @@ esac [[ "${glk[@]}" =~ "$device" ]] && isGlk=true [[ "${str[@]}" =~ "$device" ]] && isStr=true [[ "${whl[@]}" =~ "$device" ]] && isWhl=true -[[ "${shellballs[@]}" =~ "$device" ]] && hasShellball=true +[[ "${shellballs[@]}" =~ "${boardName,,}" ]] && hasShellball=true [[ "${UEFI_ROMS[@]}" =~ "$device" ]] && hasUEFIoption=true [[ "${LegacyROMs[@]}" =~ "$device" ]] && hasLegacyOption=true [[ "$isHsw" = true || "$isBdw" = true || "$isByt" = true || "$isBsw" = true \