4.0b3
- Fix for empty lines. - Went back to using FIND in the main loop for the good reasons stated by @earthing
This commit is contained in:
parent
240bcbfbee
commit
c9f62822a6
12
updater.bat
12
updater.bat
@ -3,7 +3,7 @@ TITLE ghacks user.js updater
|
|||||||
|
|
||||||
REM ### ghacks-user.js updater for Windows
|
REM ### ghacks-user.js updater for Windows
|
||||||
REM ## author: @claustromaniac
|
REM ## author: @claustromaniac
|
||||||
REM ## version: 4.0b2
|
REM ## version: 4.0b3
|
||||||
|
|
||||||
SET _myname=%~n0
|
SET _myname=%~n0
|
||||||
SET _myparams=%*
|
SET _myparams=%*
|
||||||
@ -200,15 +200,15 @@ REM ############ Merge function ############
|
|||||||
SETLOCAL DisableDelayedExpansion
|
SETLOCAL DisableDelayedExpansion
|
||||||
(
|
(
|
||||||
FOR /F "tokens=1,* delims=," %%G IN ('FINDSTR /B /I /C:"user_pref" "%~1"') DO (SET "%%G=%%H")
|
FOR /F "tokens=1,* delims=," %%G IN ('FINDSTR /B /I /C:"user_pref" "%~1"') DO (SET "%%G=%%H")
|
||||||
FOR /F "tokens=1,* delims=:" %%I IN ('FINDSTR /N "^" "%~1"') DO (
|
FOR /F "tokens=1,* delims=]" %%I IN ('FIND /N /V "" ^< "%~1"') DO (
|
||||||
FOR /F "tokens=1,* delims=," %%K IN ("%%J") DO (
|
FOR /F "delims=," %%K IN ("%%J") DO (
|
||||||
IF NOT [user_pref("_user.js.parrot"]==[%%K] (
|
IF NOT [user_pref("_user.js.parrot"]==[%%K] (
|
||||||
IF DEFINED %%K (
|
IF DEFINED %%K (
|
||||||
SETLOCAL EnableDelayedExpansion
|
SETLOCAL EnableDelayedExpansion
|
||||||
FOR /F "delims=" %%M IN ("!%%K!") DO (
|
FOR /F "delims=" %%L IN ("!%%K!") DO (
|
||||||
ENDLOCAL
|
ENDLOCAL
|
||||||
IF NOT "%%M"=="ALREADY MERGED" (
|
IF NOT "%%L"=="ALREADY MERGED" (
|
||||||
ECHO:%%K,%%M
|
ECHO:%%K,%%L
|
||||||
SET "%%K=ALREADY MERGED"
|
SET "%%K=ALREADY MERGED"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user