-
Notifications
You must be signed in to change notification settings - Fork 2
/
submodules.bat
36 lines (25 loc) · 1012 Bytes
/
submodules.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@echo off
echo. checking submodules ...
if not exist "%1" goto restore
REM ...
goto exit
:restore
echo.
echo. We detected that you need to update git submodules.
echo. We already do it automatically. Solution of VS IDE is also should be updated after ending of this process by the action via `Sln-Opened` event. If not, please reopen .sln file again.
echo.
echo. Please wait...
echo.
git submodule update --init --recursive 2>nul || goto err_gitNotFound
REM Where to find... TODO:
REM HKEY_LOCAL_MACHINE\SOFTWARE\GitForWindows
REM HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Git_is1
REM HKEY_CURRENT_USER\SOFTWARE\TortoiseGit
goto exit
:err_gitNotFound
echo. 1>&2
echo. `git` was not found or something went wrong. Check your connection and env. variable `PATH`. Or get submodules manually: 1>&2
echo. 1. Use command `git submodule update --init --recursive` 1>&2
echo. 2. Or clone initially with recursive option: `git clone --recursive ...` 1>&2
echo. 1>&2
:exit