File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 11@ echo off
22title Checking dependencies...
3- set scriptversion = 0.1
3+ set scriptversion = 1.1.0
44
55REM Set restart counter variables
66set " restartCount = 0"
@@ -23,6 +23,19 @@ if not exist .\config\StartupScript.conf (
2323
2424:initiateServer
2525title Initiating server...
26+
27+ REM Check for updates to this script.
28+ for /f " delims=" %%a in ('powershell -Command " (Invoke-WebRequest -Uri 'https://api.github.com/repos/GarnServo/mc-startup-script/releases/latest').Content | ConvertFrom-Json | Select -ExpandProperty tag_name" ') do set latestVersion = %%a
29+ echo Current script version: %scriptVersion%
30+ echo Latest version from GitHub: %latestVersion%
31+ REM Check if the script version is greater than the latest version
32+ if " %latestVersion% " LSS " v%scriptVersion% " (
33+ echo You have the latest version of the script.
34+ ) else (
35+ echo An update is available for the script ^ (version " %latest_version% " ^ ). Please visit the GitHub page for more details:
36+ echo https://github.com/GarnServo/mc-startup-script/releases/latest
37+ )
38+
2639REM Check EULA exists, if not, go to create it (and accept it)
2740if not exist " eula.txt" (
2841 goto eula
You can’t perform that action at this time.
0 commit comments