1
0
鏡像自 https://github.com/dockur/windows.git 已同步 2026-06-12 13:19:34 +08:00

feat: Backup disk image (#1399)

此提交包含在:
Kroese
2025-09-17 17:24:41 +02:00
提交者 GitHub
父節點 d08b7aeb27
當前提交 0903fad26b
+3 -2
查看文件
@@ -44,7 +44,7 @@ skipInstall() {
fi fi
fi fi
info "Detected that $method, creating a backup of your previous installation..." info "Detected that $method, a backup of your previous installation will be saved..."
local dir="$STORAGE/${previous%.*}.old" local dir="$STORAGE/${previous%.*}.old"
@@ -52,8 +52,8 @@ skipInstall() {
mkdir -p "$dir" mkdir -p "$dir"
[ -f "$STORAGE/$previous" ] && mv -f "$STORAGE/$previous" "$dir/" [ -f "$STORAGE/$previous" ] && mv -f "$STORAGE/$previous" "$dir/"
find "$STORAGE" -maxdepth 1 -type f -iname 'windows.*' -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 '*.rom' -or -iname '*.vars' \) -exec mv -n {} "$dir/" \;
find "$STORAGE" -maxdepth 1 -type f \( -iname 'data.*' -or -iname 'windows.*' \) -exec mv -n {} "$dir/" \;
return 1 return 1
@@ -132,6 +132,7 @@ startInstall() {
rm -f "$BOOT" rm -f "$BOOT"
find "$STORAGE" -maxdepth 1 -type f -iname 'data.*' -delete
find "$STORAGE" -maxdepth 1 -type f -iname 'windows.*' -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 '*.rom' -or -iname '*.vars' \) -delete