]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup HERE step 1 (#881)
authorAmos Jeffries <yadij@users.noreply.github.com>
Tue, 24 Aug 2021 18:57:39 +0000 (18:57 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 24 Aug 2021 18:57:42 +0000 (18:57 +0000)
Step 1:
 Add script to replace HERE symbol in a way that does
 not break branches during the remainder of the transition.

The script is added first as a separate commit for large
branches to merge and run before attempting to merge onto a
cleaned master branch.

The Enforcement commit is provided for review purposes to show
the changes made by the script. It should be removed before
merge.

Step 2:
 Master branch has a regular automated Enforcement commit.

Step 3:
 Then full removal of the HERE symbol as a third PR followup to
 drop it completely.

scripts/maintenance/HERE-obsolete [new file with mode: 0755]

diff --git a/scripts/maintenance/HERE-obsolete b/scripts/maintenance/HERE-obsolete
new file mode 100755 (executable)
index 0000000..c3cc64c
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/awk -f
+#
+## Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+##
+## Squid software is distributed under GPLv2+ license and includes
+## contributions from numerous individuals and organizations.
+## Please see the COPYING and CONTRIBUTORS files for details.
+##
+
+/HERE/ {
+  # HERE is obsolete
+  gsub(/,[ ]?HERE\)/, ", MYNAME)");
+  gsub(/,[ ]?[ ]?HERE[ ]?[ ]?<<[ ]?["]:[ ]/, ", \"");
+  gsub(/,[ ]?[ ]?HERE[ ]?[ ]?<<[ ]?/, ", ");
+  gsub(/[ ][ ][ ][ ]HERE[ ]?[ ]?<<[ ]?/, "    ");
+}
+{ print }