From 7b6ec67a6bd96ad1cd8c8e31ba5ac80bf90b73b8 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Mon, 9 Mar 2020 14:12:41 +0300 Subject: [PATCH] build.bat: Use better submodule cleanup code --- build.bat | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/build.bat b/build.bat index 36b27dd0ca..5bff5ae8d8 100644 --- a/build.bat +++ b/build.bat @@ -226,21 +226,9 @@ rem ------------------------------------------------------------ rem ------------------------------------------------------------ :repairSubModules -rem !!FIXME!! Implement parsing of submodules list and fill this array automatically -rem NOTE: Don't use "git submodule foreach" because broken submodule will not shown in it's list! -set SUBMODULES=_Libs\FreeImage -set SUBMODULES=%SUBMODULES% _Libs\sqlite3 -set SUBMODULES=%SUBMODULES% _Libs\AudioCodecs -set SUBMODULES=%SUBMODULES% _Libs\SDL_Mixer_X -set SUBMODULES=%SUBMODULES% _common\PGE_File_Formats -set SUBMODULES=%SUBMODULES% _common\PgeGameSave\submodule -set SUBMODULES=%SUBMODULES% Content\help -rem \=============================================================================== -for %%s in (%SUBMODULES%) do ( -echo Remove folder %%s ... -if exist %%s\nul rd /Q /S %%s -) -echo Fetching new submodules... +echo === Cleaning-up old state... +git submodule foreach 'pwd; rm -Rf * .git*;' +echo === Fetching new submodules... git submodule init git submodule update echo.