From 3f2477e8a89ddadd1dfdd9d990ac8c6fdb8ad4b3 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 1 Dec 2010 13:06:03 +0100 Subject: touch: fix help text to not show options disabled in .config Signed-off-by: Denys Vlasenko --- coreutils/touch.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'coreutils/touch.c') diff --git a/coreutils/touch.c b/coreutils/touch.c index afff36b4d..352177111 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c @@ -19,6 +19,35 @@ #include "libbb.h" +//config:config TOUCH +//config: bool "touch" +//config: default y +//config: help +//config: touch is used to create or change the access and/or +//config: modification timestamp of specified files. + +//applet:IF_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_DROP, touch)) + +//kbuild:lib-$(CONFIG_TOUCH) += touch.o + +//usage:#define touch_trivial_usage +//usage: "[-c]" IF_DESKTOP(" [-d DATE] [-r FILE]") " FILE [FILE]..." +//usage:#define touch_full_usage "\n\n" +//usage: "Update the last-modified date on the given FILE[s]\n" +//usage: "\nOptions:" +//usage: "\n -c Don't create files" +//usage: IF_DESKTOP( +//usage: "\n -d DT Date/time to use" +//usage: "\n -r FILE Use FILE's date/time" +//usage: ) +//usage: +//usage:#define touch_example_usage +//usage: "$ ls -l /tmp/foo\n" +//usage: "/bin/ls: /tmp/foo: No such file or directory\n" +//usage: "$ touch /tmp/foo\n" +//usage: "$ ls -l /tmp/foo\n" +//usage: "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n" + /* This is a NOFORK applet. Be very careful! */ /* coreutils implements: -- cgit v1.2.3