-if "%_bootimage%"=="download" (
- echo Fetching %GIT_BRANCH% boot image...
- set boot_image_url=http://downloads.factorcode.org/images/%GIT_BRANCH%/%_bootimage% %_bootimage%
- echo URL: %boot_image_url%
- cscript /nologo misc\http-get.vbs %boot_image_url% %_bootimage%
+set _bootimage_url=https://downloads.factorcode.org/images/%GIT_BRANCH%/%_bootimage%
+if "%_bootimage_type%"=="download" (
+ call :download %GIT_BRANCH% %_bootimage_url% %_bootimage%
+ if errorlevel 1 (
+ echo boot image for branch %GIT_BRANCH% is not on server, trying master instead
+ call :download master https://downloads.factorcode.org/images/master/%_bootimage% %_bootimage%
+ )