Blame po/insert-header.sin

Packit aa0600
# Sed script that inserts the file called HEADER before the header entry.
Packit aa0600
#
Packit aa0600
# At each occurrence of a line starting with "msgid ", we execute the following
Packit aa0600
# commands. At the first occurrence, insert the file. At the following
Packit aa0600
# occurrences, do nothing. The distinction between the first and the following
Packit aa0600
# occurrences is achieved by looking at the hold space.
Packit aa0600
/^msgid /{
Packit aa0600
x
Packit aa0600
# Test if the hold space is empty.
Packit aa0600
s/m/m/
Packit aa0600
ta
Packit aa0600
# Yes it was empty. First occurrence. Read the file.
Packit aa0600
r HEADER
Packit aa0600
# Output the file's contents by reading the next line. But don't lose the
Packit aa0600
# current line while doing this.
Packit aa0600
g
Packit aa0600
N
Packit aa0600
bb
Packit aa0600
:a
Packit aa0600
# The hold space was nonempty. Following occurrences. Do nothing.
Packit aa0600
x
Packit aa0600
:b
Packit aa0600
}