Only check Windows iso SHA1 if a SHA1 is available

pull/80/head
Martin Wimpress 3 years ago
parent 7daa5d671a
commit 247b3d8a4e
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
  1. 22
      quickget

@ -526,17 +526,21 @@ function get_windows() {
echo "Downloading ${WINDOWS_NAME}..."
web_get "${DOWNLOAD_URL}" "${VM_PATH}" "${FILE_NAME}"
echo "${DOWNLOAD_SHA1} ${FILE_NAME}" > "${VM_PATH}/SHA1SUMS"
echo "Checking SHA1SUMS..."
cd "${VM_PATH}"
if ! sha1sum --check SHA1SUMS --ignore-missing --status; then
echo "ERROR! ${ISO} doesn't match ${VM_PATH}/SHA1SUMS. Try running 'quickget' again."
exit 1
else
echo "All good."
# Windows 10 doesn't include a SHA1 sum
# Only check the integrity is SHA1 is available.
if [ -n "${DOWNLOAD_SHA1}" ]; then
echo "${DOWNLOAD_SHA1} ${FILE_NAME}" > "${VM_PATH}/SHA1SUMS"
echo "Checking SHA1SUMS..."
cd "${VM_PATH}"
if ! sha1sum --check SHA1SUMS --ignore-missing --status; then
echo "ERROR! ${ISO} doesn't match ${VM_PATH}/SHA1SUMS. Try running 'quickget' again."
exit 1
else
echo "All good."
fi
cd ..
fi
cd ..
echo "Downloading virtio-win.iso..."
web_get "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" "${VM_PATH}"

Loading…
Cancel
Save