summaryrefslogtreecommitdiff
path: root/docs/autodocifier.pl
diff options
context:
space:
mode:
authorMike Frysinger2006-02-05 22:10:40 +0000
committerMike Frysinger2006-02-05 22:10:40 +0000
commitb0ed3d7cc08ed715ccea67c9d9061f4074e3b176 (patch)
treee06eb9da201ff8d01ec7dae07c23f567035e80f3 /docs/autodocifier.pl
parentbec26527a1849be6f81e9eaa56d0ff40a20338d6 (diff)
downloadbusybox-b0ed3d7cc08ed715ccea67c9d9061f4074e3b176.zip
busybox-b0ed3d7cc08ed715ccea67c9d9061f4074e3b176.tar.gz
Rob Sullivan writes: Here's a patch to autogenerate the list of applets in the Busybox documentation
Diffstat (limited to 'docs/autodocifier.pl')
-rwxr-xr-xdocs/autodocifier.pl16
1 files changed, 15 insertions, 1 deletions
diff --git a/docs/autodocifier.pl b/docs/autodocifier.pl
index eee67cf..a122b0b 100755
--- a/docs/autodocifier.pl
+++ b/docs/autodocifier.pl
@@ -150,7 +150,21 @@ foreach (@ARGV) {
# generate structured documentation
my $generator = \&pod_for_usage;
-foreach my $applet (sort keys %docs) {
+
+my @names = sort keys %docs;
+print "\t[, [[, ";
+for (my $i = 0; $i < $#names; $i++) {
+ if (($i + 2) % 8 == 0) {
+ print "\n\t";
+ }
+ print "$names[$i], ";
+}
+print $names[-1];
+
+print "\n\n=head1 COMMAND DESCRIPTIONS\n";
+print "\n=over 4\n\n";
+
+foreach my $applet (@names) {
print $generator->($applet, $docs{$applet});
}