@echo off REM Runs persistently from system boot (see install.bat's scheduled task). REM Polls the host-shared Z:\ drive for a build request and, when one REM shows up, runs build.bat against it. This is what lets build_windows.sh REM on the Linux host trigger a build without any RDP/remote-exec: it's REM all just files dropped on the shared folder in both directions. REM REM UNTESTED (see install.bat's note). :wait_for_share if not exist Z:\ ( timeout /t 5 /nobreak >nul goto wait_for_share ) :loop if exist Z:\BUILD_REQUEST ( REM Claim the request before acting on it -- if watch_build.bat somehow REM ended up running twice this boot (install.bat starts it once REM immediately, the ONSTART task could also fire the same boot), only REM one of them wins this move and actually builds. move /y Z:\BUILD_REQUEST Z:\BUILD_REQUEST.claimed >nul 2>&1 if exist Z:\BUILD_REQUEST.claimed ( del Z:\BUILD_REQUEST.claimed del /q Z:\BUILD_DONE 2>nul del /q Z:\BUILD_FAILED 2>nul call C:\OEM\build.bat ) ) timeout /t 5 /nobreak >nul goto loop