Blame po/insert-header.sin

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