diff options
-rw-r--r-- | TODO | 6 | ||||
-rw-r--r-- | applets/usage.h | 24 | ||||
-rwxr-xr-x | docs/autodocifier.pl | 25 | ||||
-rw-r--r-- | docs/busybox.pod | 48 | ||||
-rw-r--r-- | docs/busybox_footer.pod | 27 | ||||
-rw-r--r-- | include/usage.h | 24 | ||||
-rw-r--r-- | usage.h | 24 |
7 files changed, 97 insertions, 81 deletions
@@ -12,7 +12,7 @@ around to it some time. If you have any good ideas, please let me know. * The busybox shell, lash, is really too weak for serious use, although it is possible to run many simple systems with it. BusyBox 0.49 was supposed to - have a new shell, updated to understand full Bourne grammer. Well, that + have a new shell, updated to understand full Bourne grammar. Well, that simply didn't happen in time for the release. A rewrite is in progress that will result in a new shell that understands the full Bourne grammar. This new shell is being championed by Larry Doolittle @@ -55,4 +55,8 @@ and then start with the biggest things and make them smaller... du.c probably ought to have an -x switch like GNU du does... +----------------------- + +xargs could use a -l option + ------------------------------------------------------------------ diff --git a/applets/usage.h b/applets/usage.h index 40171fc..7bc817f 100644 --- a/applets/usage.h +++ b/applets/usage.h @@ -338,7 +338,7 @@ #define echo_example_usage \ "$ echo "Erik is cool"\n" \ "Erik is cool\n" \ - "$ echo -e "Erik\nis\ncool"\n" \ + "$ echo -e "Erik\\nis\\ncool"\n" \ "Erik\n" \ "is\n" \ "cool\n" \ @@ -439,7 +439,7 @@ "the current directory; default EXPRESSION is '-print'\n" \ "\nEXPRESSION may consist of:\n" \ "\t-follow\t\tDereference symbolic links.\n" \ - "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \ + "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN.\n" \ "\t-print\t\tPrint (default and assumed).\n" \ USAGE_FIND_TYPE( \ "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \ @@ -822,7 +822,7 @@ #define length_full_usage \ "Prints out the length of the specified STRING." #define length_example_usage \ - "$ length "Hello"\n" \ + "$ length Hello\n" \ "5\n" #define ln_trivial_usage \ @@ -1204,7 +1204,7 @@ "Formats and prints ARGUMENT(s) according to FORMAT,\n" \ "Where FORMAT controls the output exactly as in C printf." #define printf_example_usage \ - "$ printf "Val=%d\n" 5\n" \ + "$ printf "Val=%d\\n" 5\n" \ "Val=5\n" #define ps_trivial_usage \ @@ -1366,7 +1366,7 @@ #define sort_full_usage \ "Sorts lines of text in the specified files" #define sort_example_usage \ - "$ echo -e "e\nf\nb\nd\nc\na" | sort\n" \ + "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \ "a\n" \ "b\n" \ "c\n" \ @@ -1543,7 +1543,7 @@ USAGE_TFTP_PUT( \ "\tput\tPut local file SOURCE to server DEST.\n" \ ) \ - "\nWhen nameing a server, use the syntax \"server:file\"." + "\nWhen naming a server, use the syntax \"server:file\"." #define touch_trivial_usage \ "[-c] file [file ...]" @@ -1599,11 +1599,11 @@ "[flags] filesystem|directory" #define umount_full_usage \ "Unmount file systems\n" \ - "\nFlags:\n" "\t-a:\tUnmount all file systems" \ - USAGE_MTAB(" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries") \ - "\n\t-r:\tTry to remount devices as read-only if mount is busy" \ - USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \ - USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)") + "\nFlags:\n" "\t-a\tUnmount all file systems" \ + USAGE_MTAB(" in /etc/mtab\n\t-n\tDon't erase /etc/mtab entries") \ + "\n\t-r\tTry to remount devices as read-only if mount is busy" \ + USAGE_MOUNT_FORCE("\n\t-f\tForce filesystem umount (i.e. unreachable NFS server)") \ + USAGE_MOUNT_LOOP("\n\t-l\tDo not free loop device (if a loop device has been used)") #define umount_example_usage \ "$ umount /dev/hdc1 \n" @@ -1633,7 +1633,7 @@ "\t-d\tonly print duplicate lines\n" \ "\t-u\tonly print unique lines" #define uniq_example_usage \ - "$ echo -e "a\na\nb\nc\nc\na" | sort | uniq\n" \ + "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \ "a\n" \ "b\n" \ "c\n" diff --git a/docs/autodocifier.pl b/docs/autodocifier.pl index 2bf7cd8..d753300 100755 --- a/docs/autodocifier.pl +++ b/docs/autodocifier.pl @@ -62,12 +62,12 @@ sub pod_for_usage { } my $full = join("\n", @f1); - # prepare notes if they exists + # prepare notes if they exist my $notes = (defined $usage->{notes}) ? "$usage->{notes}\n\n" : ""; - # prepare example if one exists + # prepare examples if they exist my $example = (defined $usage->{example}) ? "Example:\n\n" . @@ -107,6 +107,7 @@ sub sgml_for_usage { # { # trivial => "...", # full => "...", +# notes => "...", # example => "...", # } my %docs; @@ -176,7 +177,13 @@ autodocifier.pl - generate docs for busybox based on usage.h =head1 SYNOPSIS -autodocifier.pl usage.h > something +autodocifier.pl [OPTION]... [FILE]... + +Example: + + ( cat docs/busybox_header.pod; \ + docs/autodocifier.pl usage.h; \ + cat docs/busybox_footer.pod ) > docs/busybox.pod =head1 DESCRIPTION @@ -186,7 +193,8 @@ Currently, the same content has to be duplicated in 3 places in slightly different formats -- F<usage.h>, F<docs/busybox.pod>, and F<docs/busybox.sgml>. This is tedious, so Perl has come to the rescue. -This script was based on a script by Erik Andersen (andersen@lineo.com). +This script was based on a script by Erik Andersen <andersen@lineo.com> +which was in turn based on a script by Mark Whitley <markw@lineo.com> =head1 OPTIONS @@ -219,7 +227,7 @@ The following is an example of some data this script might parse. #define length_full_usage \ "Prints out the length of the specified STRING." #define length_example_usage \ - "$ length "Hello"\n" \ + "$ length Hello\n" \ "5\n" Each entry is a cpp macro that defines a string. The macros are @@ -249,13 +257,14 @@ is disabled. I<REQUIRED> =item B<notes> This is documentation that is intended to go in the POD or SGML, but -not be output when a B<-h> is given to a command. To see an example +not be printed when a B<-h> is given to a command. To see an example of notes being used, see init_notes_usage. I<OPTIONAL> =item B<example> This should be an example of how the command is acutally used. -I<OPTIONAL> +This will not be printed when a B<-h> is given to a command -- it +is inteded only for the POD or SGML documentation. I<OPTIONAL> =back @@ -275,4 +284,4 @@ John BEPPU <beppu@lineo.com> =cut -# $Id: autodocifier.pl,v 1.20 2001/04/10 00:00:05 kraai Exp $ +# $Id: autodocifier.pl,v 1.21 2001/04/17 17:09:34 beppu Exp $ diff --git a/docs/busybox.pod b/docs/busybox.pod index 8e8a549..e54ff82 100644 --- a/docs/busybox.pod +++ b/docs/busybox.pod @@ -441,15 +441,17 @@ WORK IN PROGRESS, only usefull for debian-installer =item B<dpkg_deb> -dpkg_deb [B<-cexX>] file directory +dpkg_deb [B<-cefItxX>] file [argument] Perform actions on debian packages (.debs) Options: - -c List contents of filesystem tree (verbose) - -l List contents of filesystem tree (.list format) - -e Extract control files to directory + -c List contents of filesystem tree + -e Extract control files to [argument] directory + -f Display control field name starting with [argument] + -I Display the control filenamed [argument] + -t Extract filesystem tree to stdout in tar format -x Exctract packages filesystem tree to directory -X Verbose extract @@ -538,9 +540,7 @@ Example: $ echo "Erik is cool" Erik is cool - $ echo -e "Erik - is - cool" + $ echo -e "Erik\nis\ncool" Erik is cool @@ -658,7 +658,8 @@ the current directory; default EXPRESSION is 'B<-print>' EXPRESSION may consist of: -follow Dereference symbolic links. - -name PATTERN File name (leading directories removed) matches PATTERN. -print Print (default and assumed). + -name PATTERN File name (leading directories removed) matches PATTERN. + -print Print (default and assumed). -type X Filetype matches X (where X is one of: f,d,l,b,c,...) -perm PERMS Permissions match any of (+NNN); all of (-NNN); @@ -1610,8 +1611,7 @@ Where FORMAT controls the output exactly as in C printf. Example: - $ printf "Val=%d - " 5 + $ printf "Val=%d\n" 5 Val=5 ------------------------------- @@ -1840,12 +1840,7 @@ Sorts lines of text in the specified files Example: - $ echo -e "e - f - b - d - c - a" | sort + $ echo -e "e\nf\nb\nd\nc\na" | sort a b c @@ -2046,7 +2041,7 @@ Commands: get Get file from server SOURCE and store to local DEST. put Put local file SOURCE to server DEST. -When nameing a server, use the syntax "server:file". +When naming a server, use the syntax "server:file". ------------------------------- @@ -2129,11 +2124,11 @@ Unmount file systems Flags: - -a: Unmount all file systems in /etc/mtab - -n: Don't erase /etc/mtab entries - -r: Try to remount devices as read-only if mount is busy - -f: Force filesystem umount (i.e. unreachable NFS server) - -l: Do not free loop device (if a loop device has been used) + -a Unmount all file systems in /etc/mtab + -n Don't erase /etc/mtab entries + -r Try to remount devices as read-only if mount is busy + -f Force filesystem umount (i.e. unreachable NFS server) + -l Do not free loop device (if a loop device has been used) Example: @@ -2179,12 +2174,7 @@ Options: Example: - $ echo -e "a - a - b - c - c - a" | sort | uniq + $ echo -e "a\na\nb\nc\nc\na" | sort | uniq a b c @@ -2537,4 +2527,4 @@ Enrique Zanardi <ezanardi@ull.es> =cut -# $Id: busybox.pod,v 1.100 2001/04/10 18:17:05 andersen Exp $ +# $Id: busybox.pod,v 1.101 2001/04/17 17:09:34 beppu Exp $ diff --git a/docs/busybox_footer.pod b/docs/busybox_footer.pod index d724dc8..2ab4e16 100644 --- a/docs/busybox_footer.pod +++ b/docs/busybox_footer.pod @@ -37,16 +37,17 @@ Erik Andersen <andersen@lineo.com>, <andersee@debian.org> =for html <br> -Edward Betts <edward@debian.org> +John Beppu <beppu@lineo.com> - expr, hostid, logname, tty, wc, whoami, yes - -=for html <br> + du, head, nslookup, sort, tee, uniq (so Kraai could rewrite them ;-), + documentation -John Beppu <beppu@lineo.com> +=for html <br> - du, head, nslookup, sort, tee, uniq +Edward Betts <edward@debian.org> + expr, hostid, logname, tty, wc, whoami, yes + =for html <br> Brian Candler <B.Candler@pobox.com> @@ -68,12 +69,24 @@ Dave Cinege <dcinege@psychosis.com> =for html <br> +Larry Doolittle <ldoolitt@recycle.lbl.gov> + + various fixes, shell rewrite + +=for html <br> + Karl M. Hegbloom <karlheg@debian.org> cp_mv.c, the test suite, various fixes to utility.c, &c. =for html <br> +Sterling Huxley <sterling@europa.com> + + vi (!!!) + +=for html <br> + Daniel Jacobowitz <dan@debian.org> mktemp.c @@ -153,4 +166,4 @@ Enrique Zanardi <ezanardi@ull.es> =cut -# $Id: busybox_footer.pod,v 1.3 2001/04/09 23:27:51 kraai Exp $ +# $Id: busybox_footer.pod,v 1.4 2001/04/17 17:09:34 beppu Exp $ diff --git a/include/usage.h b/include/usage.h index 40171fc..7bc817f 100644 --- a/include/usage.h +++ b/include/usage.h @@ -338,7 +338,7 @@ #define echo_example_usage \ "$ echo "Erik is cool"\n" \ "Erik is cool\n" \ - "$ echo -e "Erik\nis\ncool"\n" \ + "$ echo -e "Erik\\nis\\ncool"\n" \ "Erik\n" \ "is\n" \ "cool\n" \ @@ -439,7 +439,7 @@ "the current directory; default EXPRESSION is '-print'\n" \ "\nEXPRESSION may consist of:\n" \ "\t-follow\t\tDereference symbolic links.\n" \ - "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \ + "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN.\n" \ "\t-print\t\tPrint (default and assumed).\n" \ USAGE_FIND_TYPE( \ "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \ @@ -822,7 +822,7 @@ #define length_full_usage \ "Prints out the length of the specified STRING." #define length_example_usage \ - "$ length "Hello"\n" \ + "$ length Hello\n" \ "5\n" #define ln_trivial_usage \ @@ -1204,7 +1204,7 @@ "Formats and prints ARGUMENT(s) according to FORMAT,\n" \ "Where FORMAT controls the output exactly as in C printf." #define printf_example_usage \ - "$ printf "Val=%d\n" 5\n" \ + "$ printf "Val=%d\\n" 5\n" \ "Val=5\n" #define ps_trivial_usage \ @@ -1366,7 +1366,7 @@ #define sort_full_usage \ "Sorts lines of text in the specified files" #define sort_example_usage \ - "$ echo -e "e\nf\nb\nd\nc\na" | sort\n" \ + "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \ "a\n" \ "b\n" \ "c\n" \ @@ -1543,7 +1543,7 @@ USAGE_TFTP_PUT( \ "\tput\tPut local file SOURCE to server DEST.\n" \ ) \ - "\nWhen nameing a server, use the syntax \"server:file\"." + "\nWhen naming a server, use the syntax \"server:file\"." #define touch_trivial_usage \ "[-c] file [file ...]" @@ -1599,11 +1599,11 @@ "[flags] filesystem|directory" #define umount_full_usage \ "Unmount file systems\n" \ - "\nFlags:\n" "\t-a:\tUnmount all file systems" \ - USAGE_MTAB(" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries") \ - "\n\t-r:\tTry to remount devices as read-only if mount is busy" \ - USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \ - USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)") + "\nFlags:\n" "\t-a\tUnmount all file systems" \ + USAGE_MTAB(" in /etc/mtab\n\t-n\tDon't erase /etc/mtab entries") \ + "\n\t-r\tTry to remount devices as read-only if mount is busy" \ + USAGE_MOUNT_FORCE("\n\t-f\tForce filesystem umount (i.e. unreachable NFS server)") \ + USAGE_MOUNT_LOOP("\n\t-l\tDo not free loop device (if a loop device has been used)") #define umount_example_usage \ "$ umount /dev/hdc1 \n" @@ -1633,7 +1633,7 @@ "\t-d\tonly print duplicate lines\n" \ "\t-u\tonly print unique lines" #define uniq_example_usage \ - "$ echo -e "a\na\nb\nc\nc\na" | sort | uniq\n" \ + "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \ "a\n" \ "b\n" \ "c\n" @@ -338,7 +338,7 @@ #define echo_example_usage \ "$ echo "Erik is cool"\n" \ "Erik is cool\n" \ - "$ echo -e "Erik\nis\ncool"\n" \ + "$ echo -e "Erik\\nis\\ncool"\n" \ "Erik\n" \ "is\n" \ "cool\n" \ @@ -439,7 +439,7 @@ "the current directory; default EXPRESSION is '-print'\n" \ "\nEXPRESSION may consist of:\n" \ "\t-follow\t\tDereference symbolic links.\n" \ - "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \ + "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN.\n" \ "\t-print\t\tPrint (default and assumed).\n" \ USAGE_FIND_TYPE( \ "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \ @@ -822,7 +822,7 @@ #define length_full_usage \ "Prints out the length of the specified STRING." #define length_example_usage \ - "$ length "Hello"\n" \ + "$ length Hello\n" \ "5\n" #define ln_trivial_usage \ @@ -1204,7 +1204,7 @@ "Formats and prints ARGUMENT(s) according to FORMAT,\n" \ "Where FORMAT controls the output exactly as in C printf." #define printf_example_usage \ - "$ printf "Val=%d\n" 5\n" \ + "$ printf "Val=%d\\n" 5\n" \ "Val=5\n" #define ps_trivial_usage \ @@ -1366,7 +1366,7 @@ #define sort_full_usage \ "Sorts lines of text in the specified files" #define sort_example_usage \ - "$ echo -e "e\nf\nb\nd\nc\na" | sort\n" \ + "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \ "a\n" \ "b\n" \ "c\n" \ @@ -1543,7 +1543,7 @@ USAGE_TFTP_PUT( \ "\tput\tPut local file SOURCE to server DEST.\n" \ ) \ - "\nWhen nameing a server, use the syntax \"server:file\"." + "\nWhen naming a server, use the syntax \"server:file\"." #define touch_trivial_usage \ "[-c] file [file ...]" @@ -1599,11 +1599,11 @@ "[flags] filesystem|directory" #define umount_full_usage \ "Unmount file systems\n" \ - "\nFlags:\n" "\t-a:\tUnmount all file systems" \ - USAGE_MTAB(" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries") \ - "\n\t-r:\tTry to remount devices as read-only if mount is busy" \ - USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \ - USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)") + "\nFlags:\n" "\t-a\tUnmount all file systems" \ + USAGE_MTAB(" in /etc/mtab\n\t-n\tDon't erase /etc/mtab entries") \ + "\n\t-r\tTry to remount devices as read-only if mount is busy" \ + USAGE_MOUNT_FORCE("\n\t-f\tForce filesystem umount (i.e. unreachable NFS server)") \ + USAGE_MOUNT_LOOP("\n\t-l\tDo not free loop device (if a loop device has been used)") #define umount_example_usage \ "$ umount /dev/hdc1 \n" @@ -1633,7 +1633,7 @@ "\t-d\tonly print duplicate lines\n" \ "\t-u\tonly print unique lines" #define uniq_example_usage \ - "$ echo -e "a\na\nb\nc\nc\na" | sort | uniq\n" \ + "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \ "a\n" \ "b\n" \ "c\n" |