mirror of
https://github.com/arkenfox/user.js.git
synced 2025-02-23 19:03:56 +00:00
misc
To account for the possibility of the user running the script silently in the background. PAUSE would leave an instance in memory doing nothing indefinitely. I was going to use TIMEOUT but PING performs better.
This commit is contained in:
parent
6ff3d1eb36
commit
bdf69cd198
@ -49,7 +49,7 @@ IF DEFINED _updateb (
|
|||||||
) ELSE (
|
) ELSE (
|
||||||
ECHO Failed. Make sure PowerShell is allowed internet access.
|
ECHO Failed. Make sure PowerShell is allowed internet access.
|
||||||
ECHO.
|
ECHO.
|
||||||
PAUSE
|
PING -n 301 127.0.0.1>nul
|
||||||
EXIT /B
|
EXIT /B
|
||||||
)
|
)
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@ -58,6 +58,9 @@ IF DEFINED _updateb (
|
|||||||
CALL :begin
|
CALL :begin
|
||||||
REN "!_myname!.bat" "!_myname:~9!.bat"
|
REN "!_myname!.bat" "!_myname:~9!.bat"
|
||||||
EXIT /B
|
EXIT /B
|
||||||
|
) ELSE (
|
||||||
|
ECHO.
|
||||||
|
ECHO The [updated] label is reserved. Do not run an [updated] script directly, or rename it to something else before you run it.
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -230,5 +233,6 @@ FOR /F "tokens=1,* delims=]" %%G IN ('find /n /v "" ^< "%~1"') DO (
|
|||||||
ENDLOCAL
|
ENDLOCAL
|
||||||
)
|
)
|
||||||
ENDLOCAL
|
ENDLOCAL
|
||||||
|
DEL /F %1 >nul
|
||||||
GOTO :EOF
|
GOTO :EOF
|
||||||
REM ############################
|
REM ############################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user