commit c9f62822a6934b693aeb59a5788bbffc0555b1a0
parent 240bcbfbee4d622ca0aabdfdc1b5c8ce46632981
Author: claustromaniac <20734810+claustromaniac@users.noreply.github.com>
Date: Sun, 17 Dec 2017 15:01:06 +0000
4.0b3
- Fix for empty lines.
- Went back to using FIND in the main loop for the good reasons stated by @earthing
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/updater.bat b/updater.bat
@@ -3,7 +3,7 @@ TITLE ghacks user.js updater
REM ### ghacks-user.js updater for Windows
REM ## author: @claustromaniac
-REM ## version: 4.0b2
+REM ## version: 4.0b3
SET _myname=%~n0
SET _myparams=%*
@@ -200,15 +200,15 @@ REM ############ Merge function ############
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=:" %%I IN ('FINDSTR /N "^" "%~1"') DO (
- FOR /F "tokens=1,* delims=," %%K IN ("%%J") DO (
+ FOR /F "tokens=1,* delims=]" %%I IN ('FIND /N /V "" ^< "%~1"') DO (
+ FOR /F "delims=," %%K IN ("%%J") DO (
IF NOT [user_pref("_user.js.parrot"]==[%%K] (
IF DEFINED %%K (
SETLOCAL EnableDelayedExpansion
- FOR /F "delims=" %%M IN ("!%%K!") DO (
+ FOR /F "delims=" %%L IN ("!%%K!") DO (
ENDLOCAL
- IF NOT "%%M"=="ALREADY MERGED" (
- ECHO:%%K,%%M
+ IF NOT "%%L"=="ALREADY MERGED" (
+ ECHO:%%K,%%L
SET "%%K=ALREADY MERGED"
)
)