mirror of
https://github.com/dockur/windows.git
synced 2025-10-29 04:05:50 +00:00
Update install.sh
This commit is contained in:
parent
a37013ffe3
commit
f81d3b2e31
1 changed files with 22 additions and 8 deletions
|
|
@ -445,6 +445,17 @@ downloadImage() {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
removeDownload() {
|
||||||
|
|
||||||
|
local iso="$1"
|
||||||
|
|
||||||
|
[ ! -f "$iso" ] && return 0
|
||||||
|
[ -n "$CUSTOM" ] && return 0
|
||||||
|
|
||||||
|
rm -f "$iso" 2> /dev/null || true
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
extractESD() {
|
extractESD() {
|
||||||
|
|
||||||
local iso="$1"
|
local iso="$1"
|
||||||
|
|
@ -837,14 +848,17 @@ copyOEM() {
|
||||||
|
|
||||||
buildImage() {
|
buildImage() {
|
||||||
|
|
||||||
local iso="$1"
|
local dir="$1"
|
||||||
local dir="$2"
|
|
||||||
local failed="N"
|
local failed="N"
|
||||||
local cat="BOOT.CAT"
|
local cat="BOOT.CAT"
|
||||||
local log="/run/shm/iso.log"
|
local log="/run/shm/iso.log"
|
||||||
local base size size_gb space space_gb desc
|
local base size size_gb space space_gb desc
|
||||||
|
|
||||||
base=$(basename "$iso")
|
if [ -f "$BOOT" ]; then
|
||||||
|
error "File $BOOT does already exist?!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
base=$(basename "$BOOT")
|
||||||
local out="$TMP/${base%.*}.tmp"
|
local out="$TMP/${base%.*}.tmp"
|
||||||
rm -f "$out"
|
rm -f "$out"
|
||||||
|
|
||||||
|
|
@ -901,10 +915,6 @@ buildImage() {
|
||||||
[ -s "$log" ] && error="$(<"$log")"
|
[ -s "$log" ] && error="$(<"$log")"
|
||||||
[[ "$error" != "$hide" ]] && echo "$error"
|
[[ "$error" != "$hide" ]] && echo "$error"
|
||||||
|
|
||||||
if [ -f "$BOOT" ]; then
|
|
||||||
error "File $BOOT does already exist?!" && return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mv "$out" "$BOOT"
|
mv "$out" "$BOOT"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
@ -1004,11 +1014,15 @@ if ! updateImage "$DIR" "$XML"; then
|
||||||
exit 60
|
exit 60
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! removeDownload "$ISO"; then
|
||||||
|
exit 64
|
||||||
|
fi
|
||||||
|
|
||||||
if ! copyOEM "$DIR"; then
|
if ! copyOEM "$DIR"; then
|
||||||
exit 63
|
exit 63
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! buildImage "$ISO" "$DIR"; then
|
if ! buildImage "$DIR"; then
|
||||||
exit 65
|
exit 65
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue