download.cmd 570 B

1234567891011121314151617
  1. rem bDOWNLOAD bAUTO URL FILE HASH SIZE
  2. echo URL %3
  3. if "%1" == "yes" (
  4. if "%2" == "xauto" (
  5. echo Check %3 ...
  6. if exist "%~4" (
  7. powershell -ExecutionPolicy Unrestricted .\build\scriptlib\Verify-File.ps1 -hashvalue %5 -filesize %6 -filename %4 || del /Q "%4"
  8. )
  9. )
  10. if not exist "%~4" (
  11. echo Download %3 ...
  12. powershell -Command "(New-Object Net.WebClient).DownloadFile('%~3', '%~4')" || exit /B 1
  13. )
  14. )
  15. echo Verify %4 ...
  16. powershell -ExecutionPolicy Unrestricted .\build\scriptlib\Verify-File.ps1 -hashvalue %5 -filesize %6 -filename %4 || exit /B 1
  17. exit /B 0