git-pull-all 和 npm-boot-all 默认用 ../.. 做根目录

This commit is contained in:
luk.lu
2021-07-02 13:03:02 +08:00
parent 7d38379698
commit ad892e7b24
6 changed files with 24 additions and 17 deletions

View File

@@ -1,9 +1,11 @@
@echo off
@ IF "%1" == "" echo Using current folder as root folder
@ IF "%1" == "" (set BASEDIR=..\..) else (set BASEDIR=%1)
echo [ Goto %BASEDIR% as base directory ]
pushd %1
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
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
popd
pause
@GOTO END