From cec1cbb9a8c16399620b710d12b1ec31d45ea884 Mon Sep 17 00:00:00 2001 From: Lennart Pieperjohanns <95208734+lennartpj@users.noreply.github.com> Date: Fri, 1 Nov 2024 18:51:14 +0100 Subject: [PATCH 1/2] fix create-bootable-usb.sh confirmation prompt --- core/tabs/utils/create-bootable-usb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tabs/utils/create-bootable-usb.sh b/core/tabs/utils/create-bootable-usb.sh index f05830d3..22defa25 100644 --- a/core/tabs/utils/create-bootable-usb.sh +++ b/core/tabs/utils/create-bootable-usb.sh @@ -233,7 +233,7 @@ write_iso(){ printf "%b" "${RED}WARNING: This will erase all data on ${USB_DEVICE}. Are you sure you want to continue? (y/N): ${RC}" read -r CONFIRMATION - if [ "$CONFIRMATION" != "yes" ]; then + if [ "$(echo "$CONFIRMATION" | tr '[:upper:]' '[:lower:]')" != "yes" ] && [ "$(echo "$CONFIRMATION" | tr '[:upper:]' '[:lower:]')" != "y" ]; then printf "%b\n" "${YELLOW}Operation cancelled.${RC}" exit 1 fi From e96b75a890a149fe9af83bbd1040f15590708fa9 Mon Sep 17 00:00:00 2001 From: Lennart Pieperjohanns <95208734+lennartpj@users.noreply.github.com> Date: Fri, 1 Nov 2024 19:29:27 +0100 Subject: [PATCH 2/2] Update core/tabs/utils/create-bootable-usb.sh Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com> --- core/tabs/utils/create-bootable-usb.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/tabs/utils/create-bootable-usb.sh b/core/tabs/utils/create-bootable-usb.sh index 22defa25..01bee61f 100644 --- a/core/tabs/utils/create-bootable-usb.sh +++ b/core/tabs/utils/create-bootable-usb.sh @@ -233,7 +233,8 @@ write_iso(){ printf "%b" "${RED}WARNING: This will erase all data on ${USB_DEVICE}. Are you sure you want to continue? (y/N): ${RC}" read -r CONFIRMATION - if [ "$(echo "$CONFIRMATION" | tr '[:upper:]' '[:lower:]')" != "yes" ] && [ "$(echo "$CONFIRMATION" | tr '[:upper:]' '[:lower:]')" != "y" ]; then + CONFIRMATION="$(echo "$CONFIRMATION" | tr '[:upper:]' '[:lower:]')" + if [ "${CONFIRMATION}" != "yes" ] && [ "${CONFIRMATION}" != "y" ]; then printf "%b\n" "${YELLOW}Operation cancelled.${RC}" exit 1 fi