summaryrefslogtreecommitdiff
path: root/miscutils/mim.c
diff options
context:
space:
mode:
authorRon Yorston2020-01-13 10:33:46 +0000
committerDenys Vlasenko2020-04-30 17:23:08 +0200
commit981b2eff814bd186188ad66a32990a6d17b37a3e (patch)
tree9d66d4de595eac03a479de13ea8a66daf69c87cd /miscutils/mim.c
parentda7a6dbfa5d78e3d5cec5906b402908505d0fcf9 (diff)
downloadbusybox-981b2eff814bd186188ad66a32990a6d17b37a3e.zip
busybox-981b2eff814bd186188ad66a32990a6d17b37a3e.tar.gz
mim: run scripts from a specification file
mim runs scripts from a specification file which can be thought of as an extremely limited Makefile. Neither make variables nor dependencies are supported. By default the file 'Mimfile' is read. An example: hello: echo hello $1 clean: rm -rf * The command 'mim' or 'mim hello' will echo 'hello'. Unlike 'make' arguments after the first are available to the script; they don't specify additional targets. mim isn't enabled by default. Enabling it increases the size of the binary by about 500 bytes. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils/mim.c')
-rw-r--r--miscutils/mim.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/miscutils/mim.c b/miscutils/mim.c
new file mode 100644
index 0000000..d9b4694
--- /dev/null
+++ b/miscutils/mim.c
@@ -0,0 +1,15 @@
+//config:config MIM
+//config: bool "mim (0.5 kb)"
+//config: default y
+//config: depends on FEATURE_SH_EMBEDDED_SCRIPTS
+//config: help
+//config: Run a script from a Makefile-like specification file.
+//config: Unlike 'make' dependencies aren't supported.
+
+//applet:IF_MIM(APPLET_SCRIPTED(mim, scripted, BB_DIR_USR_SBIN, BB_SUID_DROP, mim))
+
+//usage:#define mim_trivial_usage
+//usage: "[-f FILE] [SHELL_OPTIONS] [TARGET] ..."
+//usage:#define mim_full_usage "\n\n"
+//usage: "Run a script from a Makefile-like specification file\n"
+//usage: "\n -f FILE Spec file (default Mimfile)"