user.js

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit d71321027b78cbb42aa765db7a055d51f8b010d0
parent d3eda589bb4e4063aaeba848eb08e5d1fbcde7b2
Author: earthlng <earthlng@users.noreply.github.com>
Date:   Tue, 28 Nov 2017 18:17:47 +0100

updater.bat v3.0 the real deal

updater auto-update part - let's give this a shot - volunteers?
Diffstat:
Mupdater.bat | 24++++++++++++++++++++++++
1 file changed, 24 insertions(+), 0 deletions(-)

diff --git a/updater.bat b/updater.bat @@ -36,6 +36,30 @@ SHIFT GOTO parse :endparse ECHO. +IF DEFINED _updateb ( + ECHO Checking updater version... + ECHO. + DEL /F "!_myname!-updated.bat" 2>nul + powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/ghacksuserjs/ghacks-user.js/raw/master/updater.bat', '!_myname!-updated.bat')" >nul + IF EXIST "!_myname!-updated.bat" ( + CLS + START CMD /C "!_myname!-updated.bat" !_myparams:-updatebatch=! + DEL /F "!_myname!.bat" 2>nul + EXIT /B + ) ELSE ( + ECHO Failed. Make sure PowerShell is allowed internet access. + ECHO. + PAUSE + EXIT /B + ) +) ELSE ( + IF NOT "!_myname!"=="!_myname:-updated=X!" ( + CALL :begin + REN "!_myname!.bat" "!_myname:-updated=!.bat" + EXIT /B + ) +) +:begin SET /A "_line=0" IF NOT EXIST user.js ( ECHO user.js not detected in the current directory.