Skip to content

Instantly share code, notes, and snippets.

@fr34kyn01535
Created February 23, 2017 18:32
Show Gist options
  • Save fr34kyn01535/b15db54051e66c96fc50866de1c8edb2 to your computer and use it in GitHub Desktop.
Save fr34kyn01535/b15db54051e66c96fc50866de1c8edb2 to your computer and use it in GitHub Desktop.
@echo off
set newbuildid=0
set buildid=0
bitsadmin /transfer buildid /download http://update.unturned.hosting/buildid.tmp %~dp0buildid.tmp
set /p newbuildid=<%~dp0buildid.tmp
set /p buildid=<%~dp0buildid.cache
cls
echo Lastest version: %newbuildid%
if "%newbuildid%" == "%buildid%" (
echo No update available
)else (
echo %newbuildid%>%~dp0buildid.cache
echo Current version: %buildid%
echo New version, updating now
REM start update.bat
)
del %~dp0buildid.tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment