summaryrefslogtreecommitdiffhomepage
path: root/debianutils/run_parts.c
diff options
context:
space:
mode:
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 {