赞
踩
- @echo off
- setlocal
-
- @REM normalize the relative path to a shorter absolute path.
- pushd "%~dp0"
- set repos_path=%CD%
- popd
-
- call :find_and_pull %repos_path%
- echo. & echo Finished. & pause>nul
- goto :EOF
-
- ::-------------------------------------
- :: @name find_and_pull
- :: @param %1 base directory to find .git
- :: @usage call :find_and_pull %base_dir%
- ::-------------------------------------
- :find_and_pull
- for /d %%i in (%1\*) do (
- cd %%i
- if exist .git (
- echo. & echo [ START git pull FROM ] %%i
- git pull
- ) else (
- call :find_and_pull %%i
- )
- )
- goto :EOF
![](https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。