12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- @echo off & color 0A
- @title git tool
- rem 当前文件夹名称
- pushd %1 & for %%i in (.) do set curr=%%~ni
- if "%curr%"=="WingCloudServer" (
- cd ..
- goto Main
- ) else (
- echo the current folder is %curr%, operation was cancelled!
- pause>nul
- exit
- )
- :Main
- set /a pullnum=0
- for /d %%i in (*) do (
- cd %%i
- if exist *.git (
- set /a pullnum+=1
- )
- cd ..
- )
- if %pullnum% equ 0 (
- echo [正在下载项目文件,请勿关闭当前操作页]
- goto Clone
- ) else (
- echo [正在检查获取远程代码,请勿关闭当前操作页]
- for /d %%i in (*) do (
- cd %%i
- if exist *.git (
- echo ---------------------- %%i ----------------------
- chdir && git pull
- )
- cd ..
- )
- if %pullnum% lss 13 (
- goto MsgClone
- )
- )
- echo;
- echo Finished!
- pause>nul
- exit
- :MsgClone
- echo;
- echo 远程代码已成功合并到本地,是否检查下载其它模块?(y/n)
- set /p dl=
- if "%dl%"=="y" (
- goto Clone
- ) else (
- echo;
- echo Finished!
- )
- pause>nul
- exit
- :Clone
- if not exist WingServerCommon (git clone http://git.ius.plus:88/Project-Wing/WingServerCommon.git && echo;)
- if not exist WingMongoDBModule (git clone http://git.ius.plus:88/Project-Wing/WingMongoDBModule.git && echo;)
- if not exist WingStorageModule (git clone http://git.ius.plus:88/Project-Wing/WingStorageModule.git && echo;)
- if not exist WingSMSModule (git clone http://git.ius.plus:88/Project-Wing/WingSMSModule.git && echo;)
- if not exist WingUserModule (git clone http://git.ius.plus:88/Project-Wing/WingUserModule.git && echo;)
- if not exist WingSessionModule (git clone http://git.ius.plus:88/Project-Wing/WingSessionModule.git && echo;)
- if not exist WingRemedicalModule (git clone http://git.ius.plus:88/Project-Wing/WingRemedicalModule.git && echo;)
- if not exist WingManagementModule (git clone http://git.ius.plus:88/Project-Wing/WingManagementModule.git && echo;)
- if not exist WingEmailModule (git clone http://git.ius.plus:88/Project-Wing/WingEmailModule.git && echo;)
- if not exist WingInterfaceLibrary (git clone http://git.ius.plus:88/Project-Wing/WingInterfaceLibrary.git && echo;)
- if not exist WingCloudServer (git clone http://git.ius.plus:88/Project-Wing/WingCloudServer.git && echo;)
- if not exist WingDeviceService (git clone http://git.ius.plus:88/Project-Wing/WingDeviceService.git && echo;)
- if not exist WingNotificationModule (git clone http://git.ius.plus/Project-Wing/WingNotificationModule.git && echo;)
- echo Finished!
- pause>nul
- exit
|