mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 03:15:49 +00:00
feat: Include drivers in image
This commit is contained in:
parent
efd1d1498e
commit
831d623fdd
1 changed files with 4 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue