mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 18:08:23 +00:00
The sudo manuals contain conditional to avoid describing system-specific behavior on systems that don't support it. When we convert from mdoc to man format we lose those conditionals, these sed scripts add them back. Changes to the mdoc files can prevent the regexps from matching so they need to be updated periodically.
77 lines
1.5 KiB
Sed
77 lines
1.5 KiB
Sed
s/^\(.TH .*\)/.nr SL @SEMAN@\
|
|
.nr BA @BAMAN@\
|
|
.nr LC @LCMAN@\
|
|
.nr PS @PSMAN@\
|
|
\1/
|
|
|
|
s/^\(\[\\fB\\-a\\fR.*\\fItype\\fR\]\) *$/.if \\n(BA \1/
|
|
s/^\(\[\\fB\\-c\\fR.*\\fIclass\\fR\]\) *$/.if \\n(LC \1/
|
|
s/^\(\[\\fB\\-r\\fR.*\\fIrole\\fR\]\) *$/.if \\n(SL \1/
|
|
s/^\(\[\\fB\\-t\\fR.*\\fItype\\fR\]\) *$/.if \\n(SL \1/
|
|
|
|
/^\.TP 8n$/ {
|
|
N
|
|
/^\.TP 8n\n\\fB\\-a\\fR.*\\fItype\\fR$/,/^\.TP 8n/ {
|
|
/^\.TP 8n/ {
|
|
/^\.TP 8n\n\\fB\\-a\\fR.*\\fItype\\fR$/i\
|
|
.if \\n(BA \\{\\
|
|
/^\.TP 8n\n\\fB\\-a\\fR.*\\fItype\\fR$/!i\
|
|
.\\}
|
|
}
|
|
}
|
|
/^\.TP 8n\n\\fB\\-c\\fR.*\\fIclass\\fR$/,/^\.TP 8n/ {
|
|
/^\.TP 8n/ {
|
|
/^\.TP 8n\n\\fB\\-c\\fR.*\\fIclass\\fR$/i\
|
|
.if \\n(LC \\{\\
|
|
/^\.TP 8n\n\\fB\\-c\\fR.*\\fIclass\\fR$/!i\
|
|
.\\}
|
|
}
|
|
}
|
|
/^\.TP 8n\n\\fB\\-r\\fR.*\\fIrole\\fR$/,/^\.TP 8n/ {
|
|
/^\.TP 8n/ {
|
|
/^\.TP 8n\n\\fB\\-r\\fR.*\\fIrole\\fR$/i\
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