Blame po/insert-header.sin

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