aboutsummaryrefslogtreecommitdiff
path: root/debianutils/run_parts.c
diff options
context:
space:
mode:
authorPere Orga <gotrunks@gmail.com>2011-04-01 22:56:30 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-04-03 01:33:55 +0200
commit6a3e01d5a9f979f7d6e52665c2bf6c74e2592980 (patch)
treeb7d40d6e0c6042f0d102101ff7b5784d2f0536ba /debianutils/run_parts.c
parentfa9126e68904b16aee2a0fc47688ffe17403152a (diff)
downloadbusybox-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.tar.gz
move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'debianutils/run_parts.c')
-rw-r--r--debianutils/run_parts.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c
index b93a5a917..0c2302696 100644
--- a/debianutils/run_parts.c
+++ b/debianutils/run_parts.c
@@ -30,6 +30,32 @@
* -u MASK umask. Set the umask of the program executed to MASK.
*/
+//usage:#define run_parts_trivial_usage
+//usage: "[-t] "IF_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
+//usage:#define run_parts_full_usage "\n\n"
+//usage: "Run a bunch of scripts in DIRECTORY\n"
+//usage: "\nOptions:"
+//usage: "\n -t Print what would be run, but don't actually run anything"
+//usage: "\n -a ARG Pass ARG as argument for every program"
+//usage: "\n -u MASK Set the umask to MASK before running every program"
+//usage: IF_FEATURE_RUN_PARTS_FANCY(
+//usage: "\n -l Print names of all matching files even if they are not executable"
+//usage: )
+//usage:
+//usage:#define run_parts_example_usage
+//usage: "$ run-parts -a start /etc/init.d\n"
+//usage: "$ run-parts -a stop=now /etc/init.d\n\n"
+//usage: "Let's assume you have a script foo/dosomething:\n"
+//usage: "#!/bin/sh\n"
+//usage: "for i in $*; do eval $i; done; unset i\n"
+//usage: "case \"$1\" in\n"
+//usage: "start*) echo starting something;;\n"
+//usage: "stop*) set -x; shutdown -h $stop;;\n"
+//usage: "esac\n\n"
+//usage: "Running this yields:\n"
+//usage: "$run-parts -a stop=+4m foo/\n"
+//usage: "+ shutdown -h +4m"
+
#include "libbb.h"
struct globals {