Blame po/insert-header.sin

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