From ceaacaeb2c24d4b0bad0ea2c0f391581ba947c80 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 17 Sep 2025 22:24:25 +0200 Subject: [PATCH 1/5] fix: Increment backups --- src/install.sh | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/src/install.sh b/src/install.sh index 867a4c8..41bb508 100644 --- a/src/install.sh +++ b/src/install.sh @@ -15,7 +15,7 @@ backup () { mkdir -p "$dir" - while [ -d "$STORAGE/$folder" ] + while [ -d "$dir/$folder" ] do count=$[$count +1] folder="${name}.${count}" @@ -27,13 +27,11 @@ backup () { mkdir -p "$dir" [ -f "$iso" ] && mv -f "$iso" "$dir/" + find "$STORAGE" -maxdepth 1 -type f -iname 'data.*' -not -iname '*.iso' -exec mv -n {} "$dir/" \; + find "$STORAGE" -maxdepth 1 -type f -iname 'windows.*' -not -iname '*.iso' -exec mv -n {} "$dir/" \; find "$STORAGE" -maxdepth 1 -type f \( -iname '*.rom' -or -iname '*.vars' \) -exec mv -n {} "$dir/" \; - find "$STORAGE" -maxdepth 1 -type f \( -iname 'data.*' -or -iname 'windows.*' \) -exec mv -n {} "$dir/" \; - - if [ -z "$(ls -A "$dir")" ]; then - rm -rf "$dir" - fi + [ -z "$(ls -A "$dir")" ] && rm -rf "$dir" return 0 } @@ -51,7 +49,6 @@ skipInstall() { previous="${previous//[![:print:]]/}" if [ -n "$previous" ]; then - if [[ "${STORAGE,,}/${previous,,}" != "${iso,,}" ]]; then if ! hasDisk; then @@ -78,10 +75,7 @@ skipInstall() { fi info "Detected that $method, a backup of your previous installation will be saved..." - - if ! backup "$STORAGE/$previous" "${previous%.*}"; then - error "Backup failed!" - fi + ! backup "$STORAGE/$previous" "${previous%.*}" && error "Backup failed!" return 1 @@ -146,11 +140,7 @@ startInstall() { skipInstall "$BOOT" && return 1 if hasDisk; then - - if ! backup "" "backup"; then - error "Backup failed!" - fi - + ! backup "" "backup" && error "Backup failed!" fi mkdir -p "$TMP" @@ -168,8 +158,9 @@ startInstall() { rm -f "$BOOT" + find "$STORAGE" -maxdepth 1 -type f -iname 'data.*' -not -iname '*.iso' -delete + find "$STORAGE" -maxdepth 1 -type f -iname 'windows.*' -not -iname '*.iso' -delete find "$STORAGE" -maxdepth 1 -type f \( -iname '*.rom' -or -iname '*.vars' \) -delete - find "$STORAGE" -maxdepth 1 -type f \( -iname 'data.*' -or -iname 'windows.*' \) -delete return 0 } From 49090dcbc4e7ca2aa9e4ad3434935ecc9032c260 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 17 Sep 2025 22:48:30 +0200 Subject: [PATCH 2/5] fix: Backups --- src/install.sh | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/install.sh b/src/install.sh index 41bb508..78af870 100644 --- a/src/install.sh +++ b/src/install.sh @@ -9,20 +9,29 @@ backup () { local count=1 local iso="$1" - local name="$2" - local folder="$name" - local dir="$STORAGE/backups" + local folder="unknown" + local root="$STORAGE/backups" + local previous="$STORAGE/windows.base" - mkdir -p "$dir" + if [ -f "$previous" ]; then - while [ -d "$dir/$folder" ] + previous=$(<"$previous") + previous="${previous//[![:print:]]/}" + + [ -n "$previous" ] && folder="${previous%.*}" + + fi + + mkdir -p "$root" + local dir="$root/$folder" + + while [ -d "$dir" ] do count=$[$count +1] - folder="${name}.${count}" + folder="${folder%.*}.${count}" + dir="$root/$folder" done - dir+="/$folder" - rm -rf "$dir" mkdir -p "$dir" @@ -32,6 +41,8 @@ backup () { find "$STORAGE" -maxdepth 1 -type f \( -iname '*.rom' -or -iname '*.vars' \) -exec mv -n {} "$dir/" \; [ -z "$(ls -A "$dir")" ] && rm -rf "$dir" + [ -z "$(ls -A "$root")" ] && rm -rf "$root" + return 0 } @@ -75,7 +86,7 @@ skipInstall() { fi info "Detected that $method, a backup of your previous installation will be saved..." - ! backup "$STORAGE/$previous" "${previous%.*}" && error "Backup failed!" + ! backup "$STORAGE/$previous" && error "Backup failed!" return 1 @@ -140,7 +151,7 @@ startInstall() { skipInstall "$BOOT" && return 1 if hasDisk; then - ! backup "" "backup" && error "Backup failed!" + ! backup "" && error "Backup failed!" fi mkdir -p "$TMP" From adc4eda4f2d3b65449199fd0049ab11067af82c6 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 17 Sep 2025 22:55:30 +0200 Subject: [PATCH 3/5] feat: Add support Nano 11 --- src/define.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/define.sh b/src/define.sh index 4884f5d..0aa6bf3 100644 --- a/src/define.sh +++ b/src/define.sh @@ -135,8 +135,12 @@ parseVersion() { "2003" | "2003r2" | "win2003" | "win2003r2" | "windows2003" | "windows 2003" ) VERSION="win2003r2" ;; - "core11" | "core 11" ) - VERSION="core11" + "nano11" | "nano 11" ) + VERSION="nano11" + [ -z "$DETECTED" ] && DETECTED="win11x64" + ;; + "" | "core 11" ) + VERSION="" [ -z "$DETECTED" ] && DETECTED="win11x64" ;; "tiny11" | "tiny 11" ) @@ -432,6 +436,7 @@ printVersion() { "tiny11"* ) desc="Tiny 11" ;; "tiny10"* ) desc="Tiny 10" ;; "core11"* ) desc="Core 11" ;; + "nano11"* ) desc="Nano 11" ;; "win7"* ) desc="Windows 7" ;; "win8"* ) desc="Windows 8" ;; "win10"* ) desc="Windows 10" ;; @@ -570,6 +575,9 @@ fromFile() { *"winvista"* | *"win_vista"* | *"windowsvista"* | *"windows_vista"* ) id="winvista${arch}" ;; + "nano11"* | "nano_11"* ) + id="nano11" + ;; "tiny11core"* | "tiny11_core"* | "tiny_11_core"* ) id="core11" ;; @@ -1093,6 +1101,11 @@ getLink4() { [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0 case "${id,,}" in + "nano11" ) + size=2159738880 + sum="78f0f44444ff95b97125b43e560a72e0d6ce0a665cf9f5573bf268191e5510c1" + url="nano11_25h2/nano11%2025h2.iso" + ;; "core11" ) size=2159738880 sum="78f0f44444ff95b97125b43e560a72e0d6ce0a665cf9f5573bf268191e5510c1" From e3e3a45697deffb34ac9d5d665f594f768148704 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 17 Sep 2025 23:15:15 +0200 Subject: [PATCH 4/5] fix: Backup folder generation --- src/install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/install.sh b/src/install.sh index 78af870..be1aaa9 100644 --- a/src/install.sh +++ b/src/install.sh @@ -9,7 +9,7 @@ backup () { local count=1 local iso="$1" - local folder="unknown" + local name="unknown" local root="$STORAGE/backups" local previous="$STORAGE/windows.base" @@ -18,17 +18,18 @@ backup () { previous=$(<"$previous") previous="${previous//[![:print:]]/}" - [ -n "$previous" ] && folder="${previous%.*}" + [ -n "$previous" ] && name="${previous%.*}" fi mkdir -p "$root" + local folder="$name" local dir="$root/$folder" while [ -d "$dir" ] do count=$[$count +1] - folder="${folder%.*}.${count}" + folder="${name}.${count}" dir="$root/$folder" done From b6b1dd3ed40eb1719c426543fff47639426cf345 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 17 Sep 2025 23:43:39 +0200 Subject: [PATCH 5/5] fix: Set correct checksums for Nano11 --- src/define.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/define.sh b/src/define.sh index 0aa6bf3..931161f 100644 --- a/src/define.sh +++ b/src/define.sh @@ -1102,10 +1102,10 @@ getLink4() { case "${id,,}" in "nano11" ) - size=2159738880 - sum="78f0f44444ff95b97125b43e560a72e0d6ce0a665cf9f5573bf268191e5510c1" + size=2463565824 + sum="a1e0614372768cbe2d24de74b78a4a97bc1017ea5080dfed1d2125e4a527eb1a" url="nano11_25h2/nano11%2025h2.iso" - ;; + ;; "core11" ) size=2159738880 sum="78f0f44444ff95b97125b43e560a72e0d6ce0a665cf9f5573bf268191e5510c1"