Make sure the VM directory is created before anything is downloaded

This commit is contained in:
Martin Wimpress 2021-10-15 01:44:43 +01:00
parent 945160abe6
commit 1b1197239c
No known key found for this signature in database
GPG key ID: 61DF940515E06DA3

View file

@ -399,8 +399,8 @@ function get_freebsd() {
URL="${DL_BASE}/${VERSION}/FreeBSD-${VERSION}-RELEASE-amd64-dvd1.iso" URL="${DL_BASE}/${VERSION}/FreeBSD-${VERSION}-RELEASE-amd64-dvd1.iso"
ISO="FreeBSD-${VERSION}-RELEASE-amd64-dvd1.iso" ISO="FreeBSD-${VERSION}-RELEASE-amd64-dvd1.iso"
web_get ${URL} ${VM_PATH}
make_vm_dir make_vm_dir
web_get ${URL} ${VM_PATH}
make_vm_config ${ISO} make_vm_config ${ISO}
start_vm_info start_vm_info
} }
@ -432,6 +432,8 @@ function get_fedora() {
URL=$(echo ${FEDORA_RELEASE} | jq -r '.link') URL=$(echo ${FEDORA_RELEASE} | jq -r '.link')
SHA256SUM=$(echo ${FEDORA_RELEASE} | jq -r '.sha256') SHA256SUM=$(echo ${FEDORA_RELEASE} | jq -r '.sha256')
make_vm_dir
web_get ${URL} ${VM_PATH} web_get ${URL} ${VM_PATH}
echo "Checking SHA256SUMS..." echo "Checking SHA256SUMS..."
@ -444,7 +446,6 @@ function get_fedora() {
fi fi
cd .. cd ..
make_vm_dir
make_vm_config ${ISO} make_vm_config ${ISO}
start_vm_info start_vm_info
} }