From 113bd4d1f5d8db15e7d6b476d617f9a45dfa63bf Mon Sep 17 00:00:00 2001 From: Alpha <43486986+sudoAlphaX@users.noreply.github.com> Date: Thu, 11 Jul 2024 01:30:03 +0530 Subject: [PATCH] feat: add --unattended flag to --create-config to create unattend.iso (windows hosts) Feature request #1369 --- quickget | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/quickget b/quickget index f75e1aa..82f9ae0 100755 --- a/quickget +++ b/quickget @@ -3324,6 +3324,18 @@ function create_config() { *windows-server*) CUSTOM_OS="windows-server";; *windows*) CUSTOM_OS="windows" + while [ $# -gt 2 ]; do + case "${3}" in + -unattended|--unattended) + echo "Downloading VirtIO drivers..." + web_get "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" "${VM_PATH}" + FIXED_ISO=${VM_PATH}/virtio-win.iso + + rm -f "${VM_PATH}/unattended.iso" + unattended_windows "${VM_PATH}" + shift + esac + done ;; *freebsd*) CUSTOM_OS="freebsd";; @@ -3333,7 +3345,11 @@ function create_config() { esac echo "Selecting OS: ${CUSTOM_OS}. If this is incorrect, please modify the config file to include the correct OS." echo + if [ -n "${FIXED_ISO}" ]; then + make_vm_config "${INPUT}" "${FIXED_ISO}" + else make_vm_config "${INPUT}" + fi } # Use command -v command to check if quickemu is in the system's PATH and @@ -3373,11 +3389,14 @@ Advanced usage: Arguments: --download [edition] : Download image; no VM configuration - --create-config [path/url] : Create VM config for a OS image + --create-config [path/url] [flags] : Create VM config for a OS image --open-homepage : Open homepage for the OS --show [os] : Show OS information --version : Show version --help : Show this help message +------------------------------------ Flags ------------------------------------- +--create-config: + --unattended : Unattended windows installation -------------------------- For testing & development --------------------------- --url [os] [release] [edition] : Show image URL(s) --check [os] [release] [edition] : Check image URL(s)