#!env bash set -x name="${0%.sh}" base="https://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-DVD-x86_64-Current.iso" # Working directory tmp="$(mktemp -d)" checksums="${tmp}/checksums" # Read the SHA256 sum value sums="${base}.sha256" until curl -f -L -o "${checksums}" "${sums}"; do sleep 1 done sha="$(cut -d' ' -f 1 "${checksums}")" cat << EOF > "${name}" distro = "opensuse" version = "tumbleweed" iso = { url = "${base}" checksum = "${sha}" } boot_command = [ "e", "", " autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/autoinst.xml textmode=1", "x" ] http_directory = "distros/opensuse/tumbleweed/http/" vbox_os_type = "OpenSUSE_Tumbleweed_64" EOF rm -r "${tmp}"