mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Only check Windows iso SHA1 if a SHA1 is available
This commit is contained in:
parent
7daa5d671a
commit
247b3d8a4e
1 changed files with 13 additions and 9 deletions
22
quickget
22
quickget
|
@ -526,17 +526,21 @@ function get_windows() {
|
||||||
|
|
||||||
echo "Downloading ${WINDOWS_NAME}..."
|
echo "Downloading ${WINDOWS_NAME}..."
|
||||||
web_get "${DOWNLOAD_URL}" "${VM_PATH}" "${FILE_NAME}"
|
web_get "${DOWNLOAD_URL}" "${VM_PATH}" "${FILE_NAME}"
|
||||||
echo "${DOWNLOAD_SHA1} ${FILE_NAME}" > "${VM_PATH}/SHA1SUMS"
|
|
||||||
|
|
||||||
echo "Checking SHA1SUMS..."
|
# Windows 10 doesn't include a SHA1 sum
|
||||||
cd "${VM_PATH}"
|
# Only check the integrity is SHA1 is available.
|
||||||
if ! sha1sum --check SHA1SUMS --ignore-missing --status; then
|
if [ -n "${DOWNLOAD_SHA1}" ]; then
|
||||||
echo "ERROR! ${ISO} doesn't match ${VM_PATH}/SHA1SUMS. Try running 'quickget' again."
|
echo "${DOWNLOAD_SHA1} ${FILE_NAME}" > "${VM_PATH}/SHA1SUMS"
|
||||||
exit 1
|
echo "Checking SHA1SUMS..."
|
||||||
else
|
cd "${VM_PATH}"
|
||||||
echo "All good."
|
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
|
fi
|
||||||
cd ..
|
|
||||||
|
|
||||||
echo "Downloading virtio-win.iso..."
|
echo "Downloading virtio-win.iso..."
|
||||||
web_get "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" "${VM_PATH}"
|
web_get "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" "${VM_PATH}"
|
||||||
|
|
Loading…
Reference in a new issue