forked from tModLoader/tModLoader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-cli.bat
30 lines (26 loc) · 816 Bytes
/
setup-cli.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
@echo off
setlocal enabledelayedexpansion
where git >NUL
if !errorlevel! neq 0 (
echo git not found on PATH
exit /b %errorlevel%
)
set busybox=patches\tModLoader\Terraria\release_extras\LaunchUtils\busybox64.exe
set submoduleupdatemarker=.git\tml-setup-module-init.touch
%busybox% [ .git\index -ot %submoduleupdatemarker% ]
rem a 0 exit code means true, a 1 exit code indicates false, or missing file
if !errorlevel! neq 0 (
echo Restoring git submodules
git submodule update --init --recursive
if !errorlevel! neq 0 (
exit /b %errorlevel%
)
%busybox% touch %submoduleupdatemarker%
)
where dotnet >NUL
if !errorlevel! neq 0 (
echo dotnet not found on PATH. Install .NET Core!
exit /b %errorlevel%
)
endlocal
dotnet run --project setup/CLI/Setup.CLI.csproj -c Release -p:WarningLevel=0 -v q -- %*