@echo off SET root=%cd% echo "Syncing submodules" git submodule sync git submodule update --init --remote echo "Submodules up to date" FOR /F "delims=" %%a IN ('DIR "../dependencies" /A:d /B') DO ( echo Handling %%a cd ../dependencies/%%a/build echo %cd% IF EXIST init.bat ( echo "found init.bat" call init ) cd %root% ) cd ../ dotnet build