summaryrefslogtreecommitdiff
path: root/scripts/po/remove-potcdate.sin
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-23 21:21:51 -0500
committerDan McGee <dan@archlinux.org>2011-06-23 22:50:01 -0500
commita4a7006a138f05c1b774414a55ffb5499d7b289f (patch)
tree2ba3009d856a4bb6047ce72bc83d078c988a977e /scripts/po/remove-potcdate.sin
parent78f297dabe17eef518eaccb880f9013641124cda (diff)
downloadpacman-a4a7006a138f05c1b774414a55ffb5499d7b289f.tar.xz
po/: split into scripts/po/ and src/pacman/po/
This is the first step at separating the pacman message catalog and the scripts message catalog. Makefiles, configure.ac, and other such files are adjusted accordingly, as well as renaming files. The TEXTDOMAIN of scripts is also adjusted. Note that no actual pot or po files get changed here; these will get pruned in a future commit so each catalog contains only the necessary messages. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/po/remove-potcdate.sin')
-rw-r--r--scripts/po/remove-potcdate.sin19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/po/remove-potcdate.sin b/scripts/po/remove-potcdate.sin
new file mode 100644
index 00000000..2436c49e
--- /dev/null
+++ b/scripts/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
+}