NadekoBot/scripts/NadekoAutoRun.bat

66 lines
1.7 KiB
Batchfile
Raw Permalink Normal View History

2016-11-29 18:36:53 +00:00
@ECHO off
@TITLE NadekoBot
2016-12-16 15:12:26 +00:00
2017-03-13 05:15:51 +00:00
SET "root=%~dp0"
CD /D "%root%"
2016-12-16 15:12:26 +00:00
CLS
ECHO Welcome to NadekoBot Auto Restart and Update!
ECHO --------------------------------------------
ECHO 1.Auto Restart and Update with Dev Build (latest)
ECHO 2.Auto Restart and Update with Stable Build
ECHO 3.Run Auto Restart normally without Updating (will restart faster)
ECHO 4.To exit
ECHO.
CHOICE /C 1234 /M "Enter your choice:"
:: Note - list ERRORLEVELS in decreasing order
IF ERRORLEVEL 4 GOTO exit
IF ERRORLEVEL 3 GOTO autorun
IF ERRORLEVEL 2 GOTO stablear
IF ERRORLEVEL 1 GOTO latestar
:latestar
ECHO Auto Restart and Update with Dev Build (latest)
ECHO Bot will auto update on every restart!
2017-03-13 05:15:51 +00:00
CD /D "%~dp0NadekoBot\src\NadekoBot"
2016-11-29 18:36:53 +00:00
dotnet run --configuration Release
2016-12-16 15:12:26 +00:00
ECHO Updating...
SET "FILENAME=%~dp0\Latest.bat"
2017-03-13 04:05:32 +00:00
powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/scripts/Latest.bat -OutFile '%FILENAME%'"
2016-12-16 15:12:26 +00:00
ECHO NadekoBot Dev Build (latest) downloaded.
2017-03-13 05:15:51 +00:00
SET "root=%~dp0"
CD /D "%root%"
2016-12-16 15:12:26 +00:00
CALL Latest.bat
GOTO latestar
:stablear
ECHO Auto Restart and Update with Stable Build
ECHO Bot will auto update on every restart!
2017-03-13 05:15:51 +00:00
CD /D "%~dp0NadekoBot\src\NadekoBot"
2016-12-16 15:12:26 +00:00
dotnet run --configuration Release
ECHO Updating...
SET "FILENAME=%~dp0\Stable.bat"
2017-03-13 04:05:32 +00:00
powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/scripts/Stable.bat -OutFile '%FILENAME%'"
2016-12-16 15:12:26 +00:00
ECHO NadekoBot Stable build downloaded.
2017-03-13 05:15:51 +00:00
SET "root=%~dp0"
CD /D "%root%"
2016-12-16 15:12:26 +00:00
CALL Stable.bat
GOTO stablear
:autorun
2016-12-16 15:19:16 +00:00
ECHO Normal Auto Restart
2016-12-16 15:12:26 +00:00
ECHO Bot will not auto update on every restart!
timeout /t 3
2017-03-13 05:15:51 +00:00
CD /D "%~dp0NadekoBot\src\NadekoBot"
2016-12-16 15:12:26 +00:00
dotnet run --configuration Release
goto autorun
:Exit
2017-03-13 05:15:51 +00:00
SET "root=%~dp0"
CD /D "%root%"
2016-12-16 15:19:16 +00:00
del NadekoAutoRun.bat
2016-12-16 15:12:26 +00:00
CALL NadekoInstaller.bat