mirror of
https://github.com/dockur/windows.git
synced 2026-08-24 15:48:59 +01:00
fix: Verify Windows downloads using source metadata (#2065)
This commit is contained in:
+6
-5
@@ -1132,7 +1132,7 @@ verifyFile() {
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$hash" == "$check" ]]; then
|
if [[ "${hash,,}" == "${check,,}" ]]; then
|
||||||
info "Successfully verified $type!" && return 0
|
info "Successfully verified $type!" && return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1296,7 +1296,7 @@ downloadImage() {
|
|||||||
local detected="$DETECTED"
|
local detected="$DETECTED"
|
||||||
local requested="$version" switched=""
|
local requested="$version" switched=""
|
||||||
local tried="n" success="n" seconds="5"
|
local tried="n" success="n" seconds="5"
|
||||||
local i url sum size base language desc web_desc
|
local i url sum size base language desc web_desc metadata
|
||||||
|
|
||||||
if [[ "${version,,}" == "http"* ]]; then
|
if [[ "${version,,}" == "http"* ]]; then
|
||||||
|
|
||||||
@@ -1348,15 +1348,16 @@ downloadImage() {
|
|||||||
if [[ "$success" == "y" ]]; then
|
if [[ "$success" == "y" ]]; then
|
||||||
|
|
||||||
detected=$(getMidoDetected "$version" "$MIDO_SOURCE" "$DETECTED")
|
detected=$(getMidoDetected "$version" "$MIDO_SOURCE" "$DETECTED")
|
||||||
url=$(getMido "$version" "$lang" "")
|
metadata="${MIDO_SOURCE:-$version}"
|
||||||
|
url=$(getMido "$metadata" "$lang" "")
|
||||||
|
|
||||||
sum=""
|
sum=""
|
||||||
size=""
|
size=""
|
||||||
|
|
||||||
# Apply the metadata belonging to the configured static URL.
|
# Apply the metadata belonging to the configured static URL.
|
||||||
if [[ "${MIDO_URL%%\?*}" == "${url%%\?*}" ]]; then
|
if [[ "${MIDO_URL%%\?*}" == "${url%%\?*}" ]]; then
|
||||||
size=$(getMido "$version" "$lang" "size")
|
size=$(getMido "$metadata" "$lang" "size")
|
||||||
sum=$(getMido "$version" "$lang" "sum")
|
sum=$(getMido "$metadata" "$lang" "sum")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local download_desc="$desc"
|
local download_desc="$desc"
|
||||||
|
|||||||
Reference in New Issue
Block a user