I can't leave it alone.

This commit is contained in:
John Beppu 2001-02-23 03:12:45 +00:00
parent 8c16bc5012
commit b249fbb1dc

View File

@ -46,9 +46,10 @@ sub pod_for_usage {
my $trivial = $usage->{trivial}; my $trivial = $usage->{trivial};
$trivial =~s/(?<!\w)(-\w+)/B<$1>/sxg; $trivial =~s/(?<!\w)(-\w+)/B<$1>/sxg;
my @full = my $full =
join("\n"
map { $_ !~ /^\s/ && s/(?<!\w)(-\w+)/B<$1>/g; $_ } map { $_ !~ /^\s/ && s/(?<!\w)(-\w+)/B<$1>/g; $_ }
split("\n", $usage->{full}); split("\n", $usage->{full}));
return return
"-------------------------------\n". "-------------------------------\n".
@ -57,7 +58,7 @@ sub pod_for_usage {
"\n\n". "\n\n".
"$name $trivial". "$name $trivial".
"\n\n". "\n\n".
join("\n", @full). $full.
"\n\n" "\n\n"
; ;
} }
@ -146,11 +147,9 @@ The purpose of this script is to automagically generate documentation
for busybox using its usage.h as the original source for content. for busybox using its usage.h as the original source for content.
Currently, the same content has to be duplicated in 3 places in Currently, the same content has to be duplicated in 3 places in
slightly different formats -- F<usage.h>, F<docs/busybox.pod>, and slightly different formats -- F<usage.h>, F<docs/busybox.pod>, and
F<docs/busybox.sgml>. Duplicating the same content in these 3 places F<docs/busybox.sgml>. This is tedious, so Perl has come to the rescue.
is tedious, so Perl has come to the rescue.
This script was based on an original work by This script was based on a script by Erik Andersen (andersen@lineo.com).
Erik Andersen (andersen@lineo.com).
=head1 OPTIONS =head1 OPTIONS
@ -180,4 +179,4 @@ John BEPPU <beppu@lineo.com>
=cut =cut
# $Id: autodocifier.pl,v 1.3 2001/02/23 02:54:31 beppu Exp $ # $Id: autodocifier.pl,v 1.4 2001/02/23 03:12:45 beppu Exp $