diff --git a/sudoers.man.pl b/sudoers.man.pl new file mode 100644 index 000000000..5eacb5b2d --- /dev/null +++ b/sudoers.man.pl @@ -0,0 +1,23 @@ +#!/usr/bin/perl -p + +BEGIN { + $t = undef; +} + +if (/^\./) { + if (/^\.I[PX].*use_loginclass/) { + $t = '@LCMAN@'; + } elsif (/^\.I[PX].*(role|type)/) { + $t = '@SEMAN@'; + } else { + $t = undef; + } +} + +# Fix up broken pod2man formatting of F<@foo@/bar> +s/\\fI\\f(\(C)?I\@([^\@]*)\\fI\@/\\fI\@$2\@/g; + +# Comment out Compile-time-specific lines in DESCRIPTION +if ($t) { + $_ = $t . $_; +}