[xiph-commits] r9481 - trunk/vorbis-tools/po

thomasvs at motherfish-iii.xiph.org thomasvs at motherfish-iii.xiph.org
Sat Jun 18 09:55:34 PDT 2005


Author: thomasvs
Date: 2005-06-18 09:55:32 -0700 (Sat, 18 Jun 2005)
New Revision: 9481

Added:
   trunk/vorbis-tools/po/insert-header.sin
   trunk/vorbis-tools/po/remove-potcdate.sin
Modified:
   trunk/vorbis-tools/po/
Log:
commit the sins


Property changes on: trunk/vorbis-tools/po
___________________________________________________________________
Name: svn:ignore
   - Makefile.in
remove-potcdate.sin
*.sed
Makefile
Rules-quot
insert-header.sin
POTFILES
stamp-po
en*.header
*.gmo

   + Makefile.in
*.sed
Makefile
Rules-quot
POTFILES
stamp-po
en*.header
*.gmo


Added: trunk/vorbis-tools/po/insert-header.sin
===================================================================
--- trunk/vorbis-tools/po/insert-header.sin	2005-06-18 16:51:45 UTC (rev 9480)
+++ trunk/vorbis-tools/po/insert-header.sin	2005-06-18 16:55:32 UTC (rev 9481)
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}

Added: trunk/vorbis-tools/po/remove-potcdate.sin
===================================================================
--- trunk/vorbis-tools/po/remove-potcdate.sin	2005-06-18 16:51:45 UTC (rev 9480)
+++ trunk/vorbis-tools/po/remove-potcdate.sin	2005-06-18 16:55:32 UTC (rev 9481)
@@ -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
+}



More information about the commits mailing list