mirror of
https://github.com/dockur/windows.git
synced 2025-10-29 12:15:50 +00:00
Update install.sh
This commit is contained in:
parent
c2fd9c0e60
commit
0f3cb71e9e
1 changed files with 18 additions and 3 deletions
|
|
@ -586,6 +586,13 @@ prepareImage() {
|
|||
return 1
|
||||
}
|
||||
|
||||
updateAsset() {
|
||||
|
||||
local asset="$1"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
updateImage() {
|
||||
|
||||
local dir="$1"
|
||||
|
|
@ -645,13 +652,20 @@ updateImage() {
|
|||
xml=$(basename "$asset")
|
||||
info "Adding $xml for automatic installation..."
|
||||
|
||||
if ! wimlib-imagex update "$loc" "$index" --command "add $asset /$file" > /dev/null; then
|
||||
local answer="$TMP/$xml"
|
||||
rm -f "$answer"
|
||||
cp "$asset" "$answer"
|
||||
updateAsset "$answer"
|
||||
|
||||
if ! wimlib-imagex update "$loc" "$index" --command "add $answer /$file" > /dev/null; then
|
||||
MANUAL="Y"
|
||||
warn "failed to add answer file ($xml) to ISO image, $FB"
|
||||
else
|
||||
wimlib-imagex update "$loc" "$index" --command "add $asset /$dat" > /dev/null || true
|
||||
wimlib-imagex update "$loc" "$index" --command "add $answer /$dat" > /dev/null || true
|
||||
fi
|
||||
|
||||
rm -f "$answer"
|
||||
|
||||
fi
|
||||
|
||||
if [[ "$MANUAL" == [Yy1]* ]]; then
|
||||
|
|
@ -662,9 +676,10 @@ updateImage() {
|
|||
if ! wimlib-imagex update "$loc" "$index" --command "add $TMP/$org /$file" > /dev/null; then
|
||||
warn "failed to restore original answer file ($org)."
|
||||
fi
|
||||
rm -f "$TMP/$org"
|
||||
fi
|
||||
|
||||
rm -f "$TMP/$org"
|
||||
|
||||
fi
|
||||
|
||||
local find="$file"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue