annotate po/insert-header.sin @ 2055:2f2ffbc2d04d

gentitle changes
author William Pitcock <nenolod@atheme.org>
date Sat, 13 Oct 2007 20:43:07 -0500
parents 6bb98fbbae04
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
1 # Sed script that inserts the file called HEADER before the header entry.
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
2 #
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
3 # At each occurrence of a line starting with "msgid ", we execute the following
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
4 # commands. At the first occurrence, insert the file. At the following
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
5 # occurrences, do nothing. The distinction between the first and the following
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
6 # occurrences is achieved by looking at the hold space.
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
7 /^msgid /{
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
8 x
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
9 # Test if the hold space is empty.
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
10 s/m/m/
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
11 ta
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
12 # Yes it was empty. First occurrence. Read the file.
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
13 r HEADER
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
14 # Output the file's contents by reading the next line. But don't lose the
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
15 # current line while doing this.
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
16 g
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
17 N
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
18 bb
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
19 :a
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
20 # The hold space was nonempty. Following occurrences. Do nothing.
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
21 x
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
22 :b
6bb98fbbae04 [svn] - translation framework
nenolod
parents:
diff changeset
23 }