diff --git a/src/mido.sh b/src/mido.sh index 60fed14..caf698e 100644 --- a/src/mido.sh +++ b/src/mido.sh @@ -70,8 +70,6 @@ download_windows() { return 1 esac - echo "Downloading $id" - local url="https://www.microsoft.com/en-us/software-download/windows$windows_version" case "$windows_version" in 8 | 10) url="${url}ISO";; @@ -89,19 +87,19 @@ download_windows() { # This is the *only* request we make that Fido doesn't. Fido manually maintains a list of all the Windows release/edition product edition IDs in its script (see: $WindowsVersions array). This is helpful for downloading older releases (e.g. Windows 10 1909, 21H1, etc.) but we always want to get the newest release which is why we get this value dynamically # Also, keeping a "$WindowsVersions" array like Fido does would be way too much of a maintenance burden # Remove "Accept" header that curl sends by default - echo " - Parsing download page: ${url}" + [[ "$DEBUG" == [Yy1]* ]] && echo " - Parsing download page: ${url}" iso_download_page_html="$(curl --silent --user-agent "$user_agent" --header "Accept:" --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url")" || { handle_curl_error $? return $? } - echo -n " - Getting Product edition ID: " + [[ "$DEBUG" == [Yy1]* ]] && echo -n " - Getting Product edition ID: " # tr: Filter for only numerics to prevent HTTP parameter injection # head -c was recently added to POSIX: https://austingroupbugs.net/view.php?id=407 product_edition_id="$(echo "$iso_download_page_html" | grep -Eo '