Blame po/insert-header.sin

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