mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 11:25:49 +00:00
feat: Detect Windows version from ISO image
This commit is contained in:
parent
ef93da6915
commit
49c9b9bb2d
1 changed files with 7 additions and 4 deletions
|
|
@ -76,6 +76,7 @@ rm -rf "$TMP" && mkdir -p "$TMP"
|
||||||
|
|
||||||
ISO="$TMP/$BASE"
|
ISO="$TMP/$BASE"
|
||||||
rm -f "$ISO"
|
rm -f "$ISO"
|
||||||
|
echo
|
||||||
|
|
||||||
if [[ "$EXTERNAL" != [Yy1]* ]]; then
|
if [[ "$EXTERNAL" != [Yy1]* ]]; then
|
||||||
|
|
||||||
|
|
@ -114,7 +115,7 @@ if ((SIZE<10000000)); then
|
||||||
echo && error "Invalid ISO file: Size is smaller than 10 MB" && exit 62
|
echo && error "Invalid ISO file: Size is smaller than 10 MB" && exit 62
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo && info "Preparing ISO image for installation..." && echo
|
echo && info "Preparing ISO image for installation..."
|
||||||
|
|
||||||
DIR="$TMP/unpack"
|
DIR="$TMP/unpack"
|
||||||
rm -rf "$DIR"
|
rm -rf "$DIR"
|
||||||
|
|
@ -128,7 +129,7 @@ if [[ "$EXTERNAL" != [Yy1]* ]]; then
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
info "Detecting Windows version from ISO image..." && echo
|
info "Detecting Windows version from ISO image..."
|
||||||
|
|
||||||
XML=""
|
XML=""
|
||||||
DETECTED=""
|
DETECTED=""
|
||||||
|
|
@ -146,13 +147,15 @@ else
|
||||||
if [ -n "$DETECTED" ]; then
|
if [ -n "$DETECTED" ]; then
|
||||||
|
|
||||||
XML="$DETECTED.xml"
|
XML="$DETECTED.xml"
|
||||||
echo "Detected image of type '$DETECTED', will apply unattended.xml file." && echo
|
echo "Detected image of type '$DETECTED', will apply unattended.xml file."
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
echo "Warning: failed to detect Windows version from '$NAME', falling back to manual installation!" && echo
|
echo "Warning: failed to detect Windows version from '$NAME', falling back to manual installation!"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$MANUAL" != [Yy1]* ]]; then
|
if [[ "$MANUAL" != [Yy1]* ]]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue