fix create-bootable-usb.sh confirmation prompt

This commit is contained in:
Lennart Pieperjohanns 2024-11-01 18:51:14 +01:00 committed by GitHub
parent d4eacaeab3
commit cec1cbb9a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}" 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 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}" printf "%b\n" "${YELLOW}Operation cancelled.${RC}"
exit 1 exit 1
fi fi