De-duplicates many lines because the -ESR and -RFPalts options require too much boilerplate garbage. The script was unreadable enough without repeating code.
I don't think these changes deserve opening yet another PR, but please let me know if you disagree.
* replace /V with global VERIFY ON
* change working dir to script dir
The working dir doesn't necessarily match the script's path, depending on how the script is called. All relative paths and conditional statements using EXIST will fail whenever the working dir is not the script's own location. This fixes that.
* minimal stuff, mostly cosmetic
* prompt to run prefsCleaner under very specific circumstances
* improve -updatebatch option
* add version variable + display new script version on update
Changes:
-The script doesn't touch the user.js file until it really has to.
-The merge function is a bit smarter parsing files, at no significant cost. See examples below.
-Minor syntactic changes here and there.
Additions:
-New -multiBackups argument. I personally intend to use it to compare files and quickly review changes.
Fixes:
- Merge function:
*no longer has the potential to truncate super long lines.
*no more issues with exclamation marks in user_pref lines.
Improvements:
- Overall better performance due to ECHO syntax changes.
- Merge function on steroids! Faster than ever, and no longer generates temporary files at all. As it always should have been.
Changes, Additions, Substractions:
- Leading spaces are no longer ignored by the merge function. Lines to be merged must begin with user_pref.
- Added header with name, author, version.
- Added help sub-menu.
- Added special message when no override files are found when using -multiOverrides.
- Formatting changes.