Update install.sh
This commit is contained in:
parent
2eeff70fc6
commit
083ad0b2e1
1 changed files with 7 additions and 7 deletions
|
|
@ -484,15 +484,15 @@ detectImage() {
|
||||||
|
|
||||||
info "Detecting Windows version from ISO image..."
|
info "Detecting Windows version from ISO image..."
|
||||||
|
|
||||||
local src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)
|
local src loc tag result name name2 desc
|
||||||
|
src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)
|
||||||
|
|
||||||
if [ ! -d "$src" ]; then
|
if [ ! -d "$src" ]; then
|
||||||
warn "failed to locate 'sources' folder in ISO image, $FB"
|
warn "failed to locate 'sources' folder in ISO image, $FB"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local tag result name name2 desc
|
loc=$(find "$src" -maxdepth 1 -type f -iname install.wim | head -n 1)
|
||||||
local loc=$(find "$src" -maxdepth 1 -type f -iname install.wim | head -n 1)
|
|
||||||
[ ! -f "$loc" ] && loc=$(find "$src" -maxdepth 1 -type f -iname install.esd | head -n 1)
|
[ ! -f "$loc" ] && loc=$(find "$src" -maxdepth 1 -type f -iname install.esd | head -n 1)
|
||||||
|
|
||||||
if [ ! -f "$loc" ]; then
|
if [ ! -f "$loc" ]; then
|
||||||
|
|
@ -555,21 +555,21 @@ updateImage() {
|
||||||
local iso="$1"
|
local iso="$1"
|
||||||
local dir="$2"
|
local dir="$2"
|
||||||
local asset="/run/assets/$3"
|
local asset="/run/assets/$3"
|
||||||
local index result
|
local path src loc index result
|
||||||
|
|
||||||
[ ! -f "$asset" ] && return 0
|
[ ! -f "$asset" ] && return 0
|
||||||
|
|
||||||
local path=$(find "$dir" -maxdepth 1 -type f -iname autounattend.xml | head -n 1)
|
path=$(find "$dir" -maxdepth 1 -type f -iname autounattend.xml | head -n 1)
|
||||||
[ -n "$path" ] && cp "$asset" "$path"
|
[ -n "$path" ] && cp "$asset" "$path"
|
||||||
|
|
||||||
local src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)
|
src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)
|
||||||
|
|
||||||
if [ ! -d "$src" ]; then
|
if [ ! -d "$src" ]; then
|
||||||
warn "failed to locate 'sources' folder in ISO image, $FB"
|
warn "failed to locate 'sources' folder in ISO image, $FB"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local loc=$(find "$src" -maxdepth 1 -type f -iname boot.wim | head -n 1)
|
loc=$(find "$src" -maxdepth 1 -type f -iname boot.wim | head -n 1)
|
||||||
[ ! -f "$loc" ] && loc=$(find "$src" -maxdepth 1 -type f -iname boot.esd | head -n 1)
|
[ ! -f "$loc" ] && loc=$(find "$src" -maxdepth 1 -type f -iname boot.esd | head -n 1)
|
||||||
|
|
||||||
if [ ! -f "$loc" ]; then
|
if [ ! -f "$loc" ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue