From 831d623fdd61e0a8434f3ae038e5f3f17546e844 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 14 Jan 2024 19:19:05 +0100 Subject: [PATCH] feat: Include drivers in image --- src/install.sh | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/install.sh b/src/install.sh index 2a742bd..739dca0 100644 --- a/src/install.sh +++ b/src/install.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -: "${VERSION:="win10x64"}" +: "${VERSION:="win11x64"}" BASE="$VERSION.iso" [ -f "$STORAGE/$BASE" ] && return 0 @@ -13,6 +13,9 @@ else PROGRESS="--progress=dot:giga" fi +DEST="$STORAGE/drivers.img" +[ ! -f "$DEST" ] && cp /run/drivers.img $DEST + rm -rf "$STORAGE/tmp" mkdir -p "$STORAGE/tmp" SCRIPT="$STORAGE/tmp/mido.sh" @@ -36,17 +39,4 @@ rm -rf "$STORAGE/tmp" cd /run -DEST="$STORAGE/drivers.img" - -if [ ! -f "$DEST" ]; then - - info "Downloading VirtIO drivers for Windows..." - DRIVERS="https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" - - { wget "$DRIVERS" -O "$DEST" -q --no-check-certificate --show-progress "$PROGRESS"; rc=$?; } || : - - (( rc != 0 )) && info "Failed to download $DRIVERS, reason: $rc" && rm -f "$DEST" - -fi - return 0