From: Mike Frysinger Date: Mon, 6 Feb 2006 01:11:34 +0000 (-0000) Subject: get rid of warnings with applets that have no usage and get rid of pointless ---... X-Git-Tag: 1_1_0~240 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ba9c4d1f892d102f0384a52a0be370dd184ea1c2;p=oweals%2Fbusybox.git get rid of warnings with applets that have no usage and get rid of pointless --- separator between applets --- diff --git a/docs/autodocifier.pl b/docs/autodocifier.pl index a122b0b06..95c9f410f 100755 --- a/docs/autodocifier.pl +++ b/docs/autodocifier.pl @@ -51,10 +51,14 @@ sub pod_for_usage { # make options bold my $trivial = $usage->{trivial}; - $trivial =~ s/(?/sxg; + if (!defined $usage->{trivial}) { + $trivial = ""; + } else { + $trivial =~ s/(?/sxg; + } my @f0 = map { $_ !~ /^\s/ && s/(?/g; $_ } - split("\n", $usage->{full}); + split("\n", (defined $usage->{full} ? $usage->{full} : "")); # add "\n" prior to certain lines to make indented # lines look right @@ -89,7 +93,6 @@ sub pod_for_usage { "$full\n\n" . "$notes" . "$example" . - "-------------------------------". "\n\n" ; }