diff options
| author | Bryan Galdrikian <[email protected]> | 2018-01-22 14:04:16 -0800 |
|---|---|---|
| committer | Bryan Galdrikian <[email protected]> | 2018-01-22 14:04:16 -0800 |
| commit | 1dc1a87fba520bb45c1ce8165e8ea2c83c0a308d (patch) | |
| tree | 5f8ca75a6b92c60fb5cf3b14282fc4cc1c127eb2 /buildtools/packman/win-bootstrap/fetch_file_from_s3.cmd | |
| parent | Updating readme.md to show updated UE4 Blast integration branches (diff) | |
| download | blast-1dc1a87fba520bb45c1ce8165e8ea2c83c0a308d.tar.xz blast-1dc1a87fba520bb45c1ce8165e8ea2c83c0a308d.zip | |
Changes for 1.1.2 release candidate
See README.md, docs/release_notes.txt
Diffstat (limited to 'buildtools/packman/win-bootstrap/fetch_file_from_s3.cmd')
| -rw-r--r-- | buildtools/packman/win-bootstrap/fetch_file_from_s3.cmd | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/buildtools/packman/win-bootstrap/fetch_file_from_s3.cmd b/buildtools/packman/win-bootstrap/fetch_file_from_s3.cmd new file mode 100644 index 0000000..974d5ec --- /dev/null +++ b/buildtools/packman/win-bootstrap/fetch_file_from_s3.cmd @@ -0,0 +1,19 @@ +:: You need to specify <package-name> <target-name> as input to this command + +@set PACKAGE_NAME=%1 +@set TARGET=%2 + +@echo Fetching %PACKAGE_NAME% from s3 ... + +@powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0fetch_file_from_s3.ps1" -sourceName %PACKAGE_NAME% -output %TARGET% +:: A bug in powershell prevents the errorlevel code from being set when using the -File execution option +:: We must therefore do our own failure analysis, basically make sure the file exists and is larger than 0 bytes: +@if not exist %TARGET% goto ERROR_DOWNLOAD_FAILED +@if %~z2==0 goto ERROR_DOWNLOAD_FAILED + +@exit /b 0 + +:ERROR_DOWNLOAD_FAILED +@echo Failed to download file from %1 +@echo Most likely because endpoint cannot be reached (VPN connection down?) +@exit /b 1
\ No newline at end of file |