Files
vms/distros/centos-stream/9/amd64.pkrvars.hcl.sh
T
Greg Hellings b9f10c9c86 Make more intelligent use of the cache
Bust cache on the dynamic files
Use the cached builds for both virtualbox and Hyper-V
Hopefully improve loop downloading files to cache
2024-04-15 03:53:58 +00:00

33 lines
742 B
Bash
Executable File

#!/usr/bin/env bash
set -ex
# Name of the file to write out
name="${0%.sh}"
baseurl="https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-latest-x86_64-boot.iso"
checksums="$(mktemp)"
until curl -f -L "${baseurl}.SHA256SUM" > "${checksums}"; do
sleep 1
done
sha="$(awk '/SHA256/ {print $4}' "${checksums}")"
rm "${checksums}"
cat << HERPDERP > "${name}"
distro = "centos-stream"
version = "9"
iso = {
url = "${baseurl}"
checksum = "${sha}"
}
boot_command = [
"<up>e<wait>",
"<down><down><end><wait>",
" inst.text inst.ks=cdrom:/ks.cfg",
"<leftCtrlOn>x<leftCtrlOff>"
]
cd_files = [ "distros/centos-stream/9/disc/*" ]
vbox_os_type = "RedHat9_64"
HERPDERP
rm -f cache/CentOS-Stream-9-latest-x86_64-boot.iso