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