mirror of
https://github.com/arkenfox/user.js.git
synced 2025-05-07 01:13:43 +02:00
minimal stuff, mostly cosmetic
This commit is contained in:
parent
647f83a021
commit
61173f8db1
1 changed files with 6 additions and 2 deletions
|
@ -10,6 +10,7 @@ VERIFY ON
|
||||||
CD /D "%~dp0"
|
CD /D "%~dp0"
|
||||||
SET _myname=%~n0
|
SET _myname=%~n0
|
||||||
SET _myparams=%*
|
SET _myparams=%*
|
||||||
|
|
||||||
:parse
|
:parse
|
||||||
IF "%~1"=="" (GOTO endparse)
|
IF "%~1"=="" (GOTO endparse)
|
||||||
IF /I "%~1"=="-unattended" (SET _ua=1)
|
IF /I "%~1"=="-unattended" (SET _ua=1)
|
||||||
|
@ -22,6 +23,7 @@ IF /I "%~1"=="-singlebackup" (SET _singlebackup=1)
|
||||||
SHIFT
|
SHIFT
|
||||||
GOTO parse
|
GOTO parse
|
||||||
:endparse
|
:endparse
|
||||||
|
|
||||||
IF DEFINED _updateb (
|
IF DEFINED _updateb (
|
||||||
REM The normal flow here goes from phase 1 to phase 2 and then phase 3.
|
REM The normal flow here goes from phase 1 to phase 2 and then phase 3.
|
||||||
IF NOT "!_myname:~0,9!"=="[updated]" (
|
IF NOT "!_myname:~0,9!"=="[updated]" (
|
||||||
|
@ -70,6 +72,7 @@ IF DEFINED _updateb (
|
||||||
)
|
)
|
||||||
EXIT /B
|
EXIT /B
|
||||||
)
|
)
|
||||||
|
|
||||||
:begin
|
:begin
|
||||||
CLS
|
CLS
|
||||||
ECHO:
|
ECHO:
|
||||||
|
@ -123,7 +126,7 @@ IF DEFINED _log (
|
||||||
IF EXIST user.js.new (DEL /F "user.js.new")
|
IF EXIST user.js.new (DEL /F "user.js.new")
|
||||||
CALL :message "Retrieving latest user.js file from github repository..."
|
CALL :message "Retrieving latest user.js file from github repository..."
|
||||||
(
|
(
|
||||||
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js', 'user.js.new')"
|
PowerShell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js', 'user.js.new')"
|
||||||
) >nul 2>&1
|
) >nul 2>&1
|
||||||
IF EXIST user.js.new (
|
IF EXIST user.js.new (
|
||||||
IF DEFINED _multi (
|
IF DEFINED _multi (
|
||||||
|
@ -190,6 +193,7 @@ ECHO: %~1
|
||||||
IF NOT "2"=="%_log%" (ECHO:)
|
IF NOT "2"=="%_log%" (ECHO:)
|
||||||
ENDLOCAL
|
ENDLOCAL
|
||||||
GOTO :EOF
|
GOTO :EOF
|
||||||
|
|
||||||
REM ############ Merge function ############
|
REM ############ Merge function ############
|
||||||
:merge
|
:merge
|
||||||
SETLOCAL DisableDelayedExpansion
|
SETLOCAL DisableDelayedExpansion
|
||||||
|
@ -228,6 +232,7 @@ FOR /F tokens^=2^,^*^ delims^=^' %%G IN ('FINDSTR /R /C:"^//// --- comment-out -
|
||||||
MOVE /Y updatertempfile "%~1" >nul
|
MOVE /Y updatertempfile "%~1" >nul
|
||||||
ENDLOCAL
|
ENDLOCAL
|
||||||
GOTO :EOF
|
GOTO :EOF
|
||||||
|
|
||||||
REM ############### Help ##################
|
REM ############### Help ##################
|
||||||
:showhelp
|
:showhelp
|
||||||
MODE 80,46
|
MODE 80,46
|
||||||
|
@ -262,4 +267,3 @@ CALL :message ""
|
||||||
PAUSE
|
PAUSE
|
||||||
MODE 80,25
|
MODE 80,25
|
||||||
GOTO :begin
|
GOTO :begin
|
||||||
REM #####################################
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue