mirror of
https://github.com/dockur/windows.git
synced 2026-02-04 16:09:43 +00:00
fix: Handle read-only images
This commit is contained in:
parent
bafa48a1b7
commit
dc2993c488
1 changed files with 5 additions and 8 deletions
|
|
@ -90,7 +90,8 @@ if [[ "${VERSION,,}" == "tiny10" ]]; then
|
||||||
VERSION="https://archive.org/download/tiny-10-23-h2/tiny10%20x64%2023h2.iso"
|
VERSION="https://archive.org/download/tiny-10-23-h2/tiny10%20x64%2023h2.iso"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.iso -printf "%f\n" | head -n 1)
|
CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname windows.iso -printf "%f\n" | head -n 1)
|
||||||
|
[ -z "$CUSTOM" ] && CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.iso -printf "%f\n" | head -n 1)
|
||||||
[ -z "$CUSTOM" ] && CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname boot.iso -printf "%f\n" | head -n 1)
|
[ -z "$CUSTOM" ] && CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname boot.iso -printf "%f\n" | head -n 1)
|
||||||
[ -z "$CUSTOM" ] && CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.img -printf "%f\n" | head -n 1)
|
[ -z "$CUSTOM" ] && CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.img -printf "%f\n" | head -n 1)
|
||||||
|
|
||||||
|
|
@ -319,10 +320,6 @@ startInstall() {
|
||||||
BASE=$(echo "$BASE" | sed -e 's/[^A-Za-z0-9._-]/_/g')
|
BASE=$(echo "$BASE" | sed -e 's/[^A-Za-z0-9._-]/_/g')
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ "${BASE,,}" == "boot."* ]] && BASE="windows.iso"
|
|
||||||
[[ "${BASE,,}" == "custom."* ]] && BASE="windows.iso"
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$MANUAL" ] && MANUAL="N"
|
[ -z "$MANUAL" ] && MANUAL="N"
|
||||||
|
|
@ -347,8 +344,6 @@ startInstall() {
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
rm -f "$STORAGE/$BASE"
|
|
||||||
|
|
||||||
if skipInstall; then
|
if skipInstall; then
|
||||||
BASE=""
|
BASE=""
|
||||||
return 1
|
return 1
|
||||||
|
|
@ -1175,7 +1170,9 @@ if ! updateImage "$ISO" "$DIR" "$XML"; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f "$ISO"
|
if ! rm -f "$ISO" 2> /dev/null; then
|
||||||
|
BASE="windows.iso"
|
||||||
|
fi
|
||||||
|
|
||||||
if ! buildImage "$DIR"; then
|
if ! buildImage "$DIR"; then
|
||||||
error "Failed to build image!"
|
error "Failed to build image!"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue