tools/url-pattern-translator.pl: Skip patterns that have already been converted
authorFabian Keil <fk@fabiankeil.de>
Wed, 5 Aug 2020 09:23:06 +0000 (11:23 +0200)
committerFabian Keil <fk@fabiankeil.de>
Thu, 6 Aug 2020 08:28:55 +0000 (10:28 +0200)
It should now be safe to "convert" a file multiple times.

Sponsored by: Robert Klemme

tools/url-pattern-translator.pl

index 4a78687..5bdcac1 100755 (executable)
@@ -15,9 +15,6 @@
 #
 # url-pattern-translator.pl old.action > new.action 
 #
-# Only convert your files once, or, as RoboCop used to say,
-# there will be... trouble.
-#
 # Copyright (c) 2008 Fabian Keil <fk@fabiankeil.de>
 #
 # Permission to use, copy, modify, and distribute this software for any
@@ -106,6 +103,10 @@ sub looks_interesting($) {
 
         $type_to_skip = "predefined settings";
 
+    } elsif (m@^\s*PCRE-HOST-PATTERN:@) {
+
+        $type_to_skip = "already converted pcre host patttern";
+
     }
 
     #p("Skipping " . $type_to_skip . ": " . $_) if defined $type_to_skip;