fix: Simplify conditional checks

This commit is contained in:
Kroese 2025-09-20 23:52:18 +02:00 committed by GitHub
parent f038b9f72f
commit 05f7af3fd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -212,7 +212,7 @@ finishInstall() {
fi fi
else else
# Enable secure boot + TPM on manual installs as Win11 requires # Enable secure boot + TPM on manual installs as Win11 requires
if [[ "$MANUAL" == [Yy1]* ]] || [[ "$aborted" == [Yy1]* ]]; then if [[ "$MANUAL" == [Yy1]* || "$aborted" == [Yy1]* ]]; then
if [[ "${DETECTED,,}" == "win11"* ]]; then if [[ "${DETECTED,,}" == "win11"* ]]; then
BOOT_MODE="windows_secure" BOOT_MODE="windows_secure"
echo "$BOOT_MODE" > "$STORAGE/windows.mode" echo "$BOOT_MODE" > "$STORAGE/windows.mode"
@ -696,7 +696,7 @@ detectImage() {
desc=$(printEdition "$DETECTED" "$DETECTED") desc=$(printEdition "$DETECTED" "$DETECTED")
detectLanguage "$info" detectLanguage "$info"
if [[ "${LANGUAGE,,}" != "en" ]] && [[ "${LANGUAGE,,}" != "en-"* ]]; then if [[ "${LANGUAGE,,}" != "en" && "${LANGUAGE,,}" != "en-"* ]]; then
language=$(getLanguage "$LANGUAGE" "desc") language=$(getLanguage "$LANGUAGE" "desc")
desc+=" ($language)" desc+=" ($language)"
fi fi
@ -704,7 +704,7 @@ detectImage() {
info "Detected: $desc" info "Detected: $desc"
setXML "" && return 0 setXML "" && return 0
if [[ "$DETECTED" == "win81x86"* ]] || [[ "$DETECTED" == "win10x86"* ]]; then if [[ "$DETECTED" == "win81x86"* || "$DETECTED" == "win10x86"* ]]; then
error "The 32-bit version of $desc is not supported!" && return 1 error "The 32-bit version of $desc is not supported!" && return 1
fi fi