This commit is contained in:
Luk Lu
2021-11-30 21:54:54 +08:00
parent c0b4983585
commit c1319324e8
3 changed files with 15 additions and 6 deletions

View File

@@ -21,6 +21,7 @@ if not exist %BASEDIR% (
pushd %BASEDIR%
echo *** Current path = [%CD%] ***
echo;
@REM 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 )
@@ -29,15 +30,18 @@ for /d %%o in (*) do (
if not %%o == .vscode (
@REM 每次 git pull 都会造成 .git 目录下某些文件变化,导致云端不断自动同步。因此过滤掉 *@cloud 的目录不做更新。
echo %%o | findstr "@cloud" >NUL && (
echo !!! omitting [%BASEDIR%\%%o]
echo !!! omitting [%BASEDIR%\%%o]
echo;
) || (
echo entering [%BASEDIR%\%%o]
echo entering [%BASEDIR%\%%o]
echo;
pushd %%o
for /d %%g in (*) do (
if exist %%g\.git (
pushd %%g
echo git pulling [%BASEDIR%\%%o\%%g]
echo git pulling [%BASEDIR%\%%o\%%g]
git pull
echo;
popd
)
)