summaryrefslogtreecommitdiff
path: root/gnulib_po/remove-potcdate.sin
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-03-05 10:08:27 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-03-05 10:08:27 +0900
commita2c7c975f0813d307b31d06da2c015916a6bb16d (patch)
tree985a31e8c860c690d9f20e6621ce5fcc05ccd244 /gnulib_po/remove-potcdate.sin
parentdc6b8fd841f8acf37e6d3f7642e71cae175505bd (diff)
downloadwget-a2c7c975f0813d307b31d06da2c015916a6bb16d.tar.gz
wget-a2c7c975f0813d307b31d06da2c015916a6bb16d.tar.bz2
wget-a2c7c975f0813d307b31d06da2c015916a6bb16d.zip
Imported Upstream version 1.21upstream/1.21
Diffstat (limited to 'gnulib_po/remove-potcdate.sin')
-rw-r--r--gnulib_po/remove-potcdate.sin19
1 files changed, 19 insertions, 0 deletions
diff --git a/gnulib_po/remove-potcdate.sin b/gnulib_po/remove-potcdate.sin
new file mode 100644
index 0000000..2436c49
--- /dev/null
+++ b/gnulib_po/remove-potcdate.sin
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}