summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHolger Wansing <hwansing@mailbox.org>2020-01-18 00:33:10 +0100
committerHolger Wansing <hwansing@mailbox.org>2020-01-18 00:33:10 +0100
commitc072a23a1e66f1871139e00e85ca90c66a5be024 (patch)
treedbbca3aa7dea981236a16a05188d4b0b4be88aa0 /scripts
parentb240672bd1fbb1e5196206920fa2da444aa28bfd (diff)
downloadinstallation-guide-c072a23a1e66f1871139e00e85ca90c66a5be024.zip
Fix gawk warnings about invalid regexp escapes with latest gawk version. Thanks to Mattia Rizzolo for the hint
Diffstat (limited to 'scripts')
-rw-r--r--scripts/merge_xml.awk10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/merge_xml.awk b/scripts/merge_xml.awk
index cf87055d9..42a92c172 100644
--- a/scripts/merge_xml.awk
+++ b/scripts/merge_xml.awk
@@ -25,7 +25,7 @@ BEGIN {
{
# In the main loop we only want to process entities that are refered to
line = $0
- if (match (line, /^[[:space:]]*&.*\.xml;[[:space:]]*(<\!--.*-->[[:space:]]*|)*$/) > 0) {
+ if (match (line, /^[[:space:]]*&.*\.xml;[[:space:]]*(<!--.*-->[[:space:]]*|)*$/) > 0) {
process_file(line, "main")
}
}
@@ -92,7 +92,7 @@ function parse_file(PARSEFILE, FNAME, fname, nwline, comment_count) {
# Update the count of 'open' comments
comment_count += count_comments(nwline)
- if (match(nwline, /^[[:space:]]*&.*\.xml;[[:space:]]*(<\!--.*-->[[:space:]]*|)*$/) > 0) {
+ if (match(nwline, /^[[:space:]]*&.*\.xml;[[:space:]]*(<!--.*-->[[:space:]]*|)*$/) > 0) {
# If we find another entity reference, we process that file recursively
# But not if the reference is within a comment
if (comment_count != 0) {
@@ -102,13 +102,13 @@ function parse_file(PARSEFILE, FNAME, fname, nwline, comment_count) {
}
} else {
# Else we just print the line
- if (match(nwline, /<\!--.*<.*>.*<.*>.*-->/) > 0) {
+ if (match(nwline, /<!--.*<.*>.*<.*>.*-->/) > 0) {
# Comments containing "<...> ... <...>" are not handled correctly
# by xml2pot and split2po, so we skip lines like that
# Note: this is a workaround for a bug in the tools:
# http://bugs.kde.org/show_bug.cgi?id=90294
print "** Comment deleted in line '" nwline "'" >>LOG
- gsub(/<\!--.*<.*>.*<.*>.*-->/, "", nwline)
+ gsub(/<!--.*<.*>.*<.*>.*-->/, "", nwline)
}
print nwline >>OUTFILE
}
@@ -131,7 +131,7 @@ function get_entname(entline, ename) {
function count_comments(inline, tmpline, count) {
# 'abuse' gsub to count them
tmpline = inline
- count += gsub(/<\!--/, "", tmpline)
+ count += gsub(/<!--/, "", tmpline)
count -= gsub(/-->/, "", tmpline)
return count
}