Blame po/insert-header.sin

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