From 6968b9a369c30f912195e56c132f6357c00ba8e8 Mon Sep 17 00:00:00 2001 From: earthlng Date: Sun, 6 Jun 2021 21:30:14 +0000 Subject: [PATCH] v3.2 - proper fix for the diff issue - re-arrange the match patterns to fix the remaining issue of dropping lines after the 9999 block - make it work on Mac too - use `|` where possible so we don't need to escape the forward-slashes. That saves a few bytes and makes the pattern easier to read --- updater.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/updater.sh b/updater.sh index c054a22..6f761c9 100755 --- a/updater.sh +++ b/updater.sh @@ -2,7 +2,7 @@ ## arkenfox user.js updater for macOS and Linux -## version: 3.1 +## version: 3.2 ## Author: Pat Johnson (@overdodactyl) ## Additional contributors: @earthlng, @ema-pe, @claustromaniac @@ -236,7 +236,7 @@ add_override () { } remove_comments () { # expects 2 arguments: from-file and to-file - sed -e 's/^[[:space:]]*\/\/.*$//' -e '/^\/\*.\+\*\/[[:space:]]*$/d' -e '/^\/\*/,/\*\//d' -e '/^[[:space:]]*$/d' -e 's/);[[:space:]]*\/\/.*/);/' "$1" > "$2" + sed -e '/^\/\*.*\*\/[[:space:]]*$/d' -e '/^\/\*/,/\*\//d' -e 's|^[[:space:]]*//.*$||' -e '/^[[:space:]]*$/d' -e 's|);[[:space:]]*//.*|);|' "$1" > "$2" } # Applies latest version of user.js and any custom overrides