From 3c50a65df5565d8c94a3b183c6686952ae9c762a Mon Sep 17 00:00:00 2001 From: Alpha <43486986+sudoAlphaX@users.noreply.github.com> Date: Thu, 11 Jul 2024 01:27:27 +0530 Subject: [PATCH] refactor: move unattended win installation code inside function move code necessary for creation of unattended.iso for windows 10 and 11 inside unattended_windows function Change parameter required for unattended_windows function from autounattend.xml file to $VM_PATH --- quickget | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/quickget b/quickget index 4e6fd299ce..f75e1aa371 100755 --- a/quickget +++ b/quickget @@ -2612,7 +2612,9 @@ function get_zorin() { } function unattended_windows() { - cat << 'EOF' > "${1}" + mkdir -p "${1}/unattended" 2>/dev/null + + cat << 'EOF' > "${1}/unattended/autounattend.xml" EOF + + +echo "Downloading Spice drivers..." +web_get https://www.spice-space.org/download/windows/spice-webdavd/spice-webdavd-x64-latest.msi "${VM_PATH}/unattended" +web_get https://www.spice-space.org/download/windows/vdagent/vdagent-win-0.10.0/spice-vdagent-x64-0.10.0.msi "${VM_PATH}/unattended" +web_get https://www.spice-space.org/download/windows/usbdk/UsbDk_1.0.22_x64.msi "${VM_PATH}/unattended" + +echo "Making unattended.iso" +mkisofs -quiet -l -o "${VM_PATH}/unattended.iso" "${VM_PATH}/unattended/" } function handle_curl_error() { @@ -3203,13 +3214,7 @@ function get_windows() { rm -f "${VM_PATH}/unattended.iso" case ${RELEASE} in 10|11) - mkdir -p "${VM_PATH}/unattended" 2>/dev/null - web_get https://www.spice-space.org/download/windows/spice-webdavd/spice-webdavd-x64-latest.msi "${VM_PATH}/unattended" - web_get https://www.spice-space.org/download/windows/vdagent/vdagent-win-0.10.0/spice-vdagent-x64-0.10.0.msi "${VM_PATH}/unattended" - web_get https://www.spice-space.org/download/windows/usbdk/UsbDk_1.0.22_x64.msi "${VM_PATH}/unattended" - echo "Making unattended.iso" - unattended_windows "${VM_PATH}/unattended/autounattend.xml" - mkisofs -quiet -l -o "${VM_PATH}/unattended.iso" "${VM_PATH}/unattended/" + unattended_windows "${VM_PATH}" ;; esac