From 32d887c7418f43936920196c107783a6af11e6ab Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 5 Aug 2026 21:26:03 +0200 Subject: [PATCH] feat: Do not backup blank data disks (#2064) --- src/define.sh | 2 +- src/install.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/define.sh b/src/define.sh index 683b1577..fbc3e824 100644 --- a/src/define.sh +++ b/src/define.sh @@ -291,7 +291,7 @@ getLanguage() { lang="Polish" culture="pl-PL" ;; "br" | "pt" | "pt-br" | "portuguese" | "português" | "portugues" ) - [[ "$input" != "pt-br" ]] && id="pt-br" + [[ "$input" == "pt-br" ]] || id="pt-br" short="pt" lang="Brazilian Portuguese" desc="Portuguese" diff --git a/src/install.sh b/src/install.sh index 232b96f8..bb7d6129 100644 --- a/src/install.sh +++ b/src/install.sh @@ -274,7 +274,7 @@ startInstall() { skipInstall "$BOOT" "$previousBase" && return 1 - if [ -z "$previousBase" ] && hasDisk; then + if [ -z "$previousBase" ] && hasData; then if ! backupPrevious ""; then warn "the backup was incomplete, continuing with installation..." fi @@ -418,7 +418,7 @@ skipInstall() { # existing installation, but discard stale media when no disk exists yet. if [[ "${STORAGE,,}/${previousBase,,}" != "${iso,,}" ]]; then - if ! hasDisk; then + if ! hasData; then if ! rm -f -- "$STORAGE/$previousBase"; then error "Failed to remove ISO file \"$STORAGE/$previousBase\" !" @@ -538,7 +538,7 @@ findFile() { fi if [ -d "$dir" ]; then - if ! hasData || [ ! -f "$boot" ]; then + if ! hasDisk || [ ! -f "$boot" ]; then error "The bind $dir maps to a file that does not exist!" && return 1 fi fi