Unverified Commit e945e852 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Verify download link (#1441)

parent 8a2f2327
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -184,6 +184,7 @@ download_windows_eval() {
  local desc="$3"
  local filter=""
  local culture=""
  local compare=""
  local language=""
  local user_agent=""
  local enterprise_type=""
@@ -323,6 +324,13 @@ download_windows_eval() {
      fi ;;
  esac

  if [[ "$DEBUG" == [Yy1]* && "$VERIFY" == [Yy1]* && "${lang,,}" == "en"* ]]; then
    compare=$(getMido "$id" "$lang" "")
    if [[ "${iso_download_link,,}" != "${compare,,}" ]]; then
      echo "Retrieved link does not match the fixed link: $compare"
    fi
  fi

  MIDO_URL="$iso_download_link"
  return 0
}