forked from bdsx/bdsx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbdsx.bat
47 lines (36 loc) · 799 Bytes
/
bdsx.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
37
38
39
40
41
42
43
44
45
46
47
@echo off
set cwd=%cd%
cd /D "%~dp0"
rem check modules
if not exist "node_modules" call update.bat
if %errorlevel% neq 0 exit /b %errorlevel%
if not exist "bedrock_server\bedrock_server.exe" call update.bat
if %errorlevel% neq 0 exit /b %errorlevel%
rem remove junk
del /f bedrock_server\bdsx_shell_data.ini >nul 2>nul
rem loop begin
:_loop
rem shellprepare
call npm run -s shellprepare
if %errorlevel% equ 2 (
rmdir /s /q .\node_modules
call update.bat
goto _loop
)
rem renameMap
node renameMap.js
rem launch
cd bedrock_server
bedrock_server.exe ..
echo exit=%errorlevel% >>bdsx_shell_data.ini
cd ..
@echo.
@echo. --------------------------------
@echo. restart
@echo. --------------------------------
@echo.
rem loop end
goto _loop
:_end
cd /D "%cwd%"
exit /b