mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 03:15:49 +00:00
feat: Backup disk image
This commit is contained in:
parent
da9aacfdae
commit
9855797b56
1 changed files with 3 additions and 2 deletions
|
|
@ -44,7 +44,7 @@ skipInstall() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info "Detected that $method, a backup of your previous installation has been saved..."
|
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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue