1
0

Update prefsCleaner.bat

This commit is contained in:
claustromaniac 2018-04-22 01:34:48 +00:00 committed by GitHub
parent 8fa3a9db6b
commit fdac8fba6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,18 +65,16 @@ IF NOT ERRORLEVEL 1 (
GOTO :EOF
REM ######### Cleanup Function ##########
:cleanup
FOR /F tokens^=2^ delims^=^'^" %%G IN ('FINDSTR /R /C:"^[^\"']*user_pref[ ]*\([ ]*[\"'][^\"']*[\"'][ ]*," user.js') DO (
IF NOT ""=="%%G" (SET "[%%G]=1")
)
(
FOR /F tokens^=2^ delims^=^'^" %%G IN ('FINDSTR /R /C:"^[^\"']*user_pref[ ]*\([ ]*[\"'][^\"']*[\"'][ ]*," user.js') DO (
IF NOT ""=="%%G" (SET "[%%G]=1")
)
FOR /F "tokens=1,* delims=:" %%G IN ('FINDSTR /N "^" prefs.js') DO (
IF ""=="%%H" (
ECHO:
) ELSE (
FOR /F tokens^=1^,2^ delims^=^" %%I IN ("%%H") DO (
IF NOT DEFINED [%%J] (
ECHO:%%H
)
FOR /F tokens^=1^,2^ delims^=^"^' %%I IN ("%%H") DO (
IF NOT DEFINED [%%J] (ECHO:%%H)
)
)
)