Blame po/insert-header.sin

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