This commit is contained in:
luk.lu
2021-07-09 17:10:33 +08:00
parent c0be6a1da0
commit d8c7f0095e
5 changed files with 82 additions and 46 deletions

View File

@@ -1,17 +1,29 @@
@echo off
@ IF "%1" == "" (if exist D:\faronear (set BASEDIR=D:\faronear) else (set BASEDIR=..\..)) else (set BASEDIR=%1)
echo [ Goto %BASEDIR% as base directory ]
if not exist %BASEDIR% (
echo *** [%BASEDIR%] not exist! Exit now. ***
@ GOTO END
)
pushd %BASEDIR%
echo [ %CD% ]
for /d %%d in (*) do pushd %%d & (for /d %%d in (*) do if exist %%d/.git (pushd %%d & echo --- git pulling: %%d ... & git pull & popd)) & popd
echo *** Current path = [%CD%] ***
for /d %%d in (*) do (
pushd %%d
for /d %%d in (*) do (
if exist %%d/.git (
pushd %%d
echo --- git pulling: %%d ...
git pull
popd
)
)
popd
)
popd
pause
@GOTO END
:EMPTY
@ echo Empty target! Please assign a target path.
@ GOTO END
:END