Blame po/insert-header.sin

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