More outputs on tmp

This commit is contained in:
2024-06-20 11:58:34 +02:00
parent 35606ec5bf
commit e9e788d2ab

View File

@@ -140,11 +140,15 @@ function DownloadFiles {
}
foreach ($fileInfo in $filesToDownload) {
$filePath = Join-Path $tmpPath $fileInfo.FileName
Write-Host "Downloading $($fileInfo.FileName)..."
if (-not (Test-Path -Path $filePath -PathType Leaf)) {
Write-Host "File not found, downloading..."
Invoke-WebRequest -Uri $fileInfo.Url -OutFile $filePath
}
if ((Get-FileHash -Path $filePath -Algorithm SHA1).Hash -ne $fileInfo.Hash) {
Write-Host "File hash mismatch, redownloading..."
Invoke-WebRequest -Uri $fileInfo.Url -OutFile $filePath
}
}