diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-12-01 13:06:03 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-12-01 13:06:03 +0100 |
commit | 3f2477e8a89ddadd1dfdd9d990ac8c6fdb8ad4b3 (patch) | |
tree | f672972cbfd8cf87a1c386235fbb5522331d1a89 /coreutils | |
parent | 631fd5ccd7372e2c09e953cc3c5d0176ee2bc6d2 (diff) | |
download | busybox-w32-3f2477e8a89ddadd1dfdd9d990ac8c6fdb8ad4b3.tar.gz busybox-w32-3f2477e8a89ddadd1dfdd9d990ac8c6fdb8ad4b3.tar.bz2 busybox-w32-3f2477e8a89ddadd1dfdd9d990ac8c6fdb8ad4b3.zip |
touch: fix help text to not show options disabled in .config
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/Config.src | 7 | ||||
-rw-r--r-- | coreutils/Kbuild.src | 1 | ||||
-rw-r--r-- | coreutils/touch.c | 29 |
3 files changed, 29 insertions, 8 deletions
diff --git a/coreutils/Config.src b/coreutils/Config.src index 0eb70af55..c2fd73e59 100644 --- a/coreutils/Config.src +++ b/coreutils/Config.src | |||
@@ -661,13 +661,6 @@ config FEATURE_TEE_USE_BLOCK_IO | |||
661 | help | 661 | help |
662 | Enable this option for a faster tee, at expense of size. | 662 | Enable this option for a faster tee, at expense of size. |
663 | 663 | ||
664 | config TOUCH | ||
665 | bool "touch" | ||
666 | default y | ||
667 | help | ||
668 | touch is used to create or change the access and/or | ||
669 | modification timestamp of specified files. | ||
670 | |||
671 | config TRUE | 664 | config TRUE |
672 | bool "true" | 665 | bool "true" |
673 | default y | 666 | default y |
diff --git a/coreutils/Kbuild.src b/coreutils/Kbuild.src index 630b048df..4ea0fa50a 100644 --- a/coreutils/Kbuild.src +++ b/coreutils/Kbuild.src | |||
@@ -74,7 +74,6 @@ lib-$(CONFIG_SYNC) += sync.o | |||
74 | lib-$(CONFIG_TAC) += tac.o | 74 | lib-$(CONFIG_TAC) += tac.o |
75 | lib-$(CONFIG_TAIL) += tail.o | 75 | lib-$(CONFIG_TAIL) += tail.o |
76 | lib-$(CONFIG_TEE) += tee.o | 76 | lib-$(CONFIG_TEE) += tee.o |
77 | lib-$(CONFIG_TOUCH) += touch.o | ||
78 | lib-$(CONFIG_TRUE) += true.o | 77 | lib-$(CONFIG_TRUE) += true.o |
79 | lib-$(CONFIG_TTY) += tty.o | 78 | lib-$(CONFIG_TTY) += tty.o |
80 | lib-$(CONFIG_UNAME) += uname.o | 79 | lib-$(CONFIG_UNAME) += uname.o |
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 @@ | |||
19 | 19 | ||
20 | #include "libbb.h" | 20 | #include "libbb.h" |
21 | 21 | ||
22 | //config:config TOUCH | ||
23 | //config: bool "touch" | ||
24 | //config: default y | ||
25 | //config: help | ||
26 | //config: touch is used to create or change the access and/or | ||
27 | //config: modification timestamp of specified files. | ||
28 | |||
29 | //applet:IF_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_DROP, touch)) | ||
30 | |||
31 | //kbuild:lib-$(CONFIG_TOUCH) += touch.o | ||
32 | |||
33 | //usage:#define touch_trivial_usage | ||
34 | //usage: "[-c]" IF_DESKTOP(" [-d DATE] [-r FILE]") " FILE [FILE]..." | ||
35 | //usage:#define touch_full_usage "\n\n" | ||
36 | //usage: "Update the last-modified date on the given FILE[s]\n" | ||
37 | //usage: "\nOptions:" | ||
38 | //usage: "\n -c Don't create files" | ||
39 | //usage: IF_DESKTOP( | ||
40 | //usage: "\n -d DT Date/time to use" | ||
41 | //usage: "\n -r FILE Use FILE's date/time" | ||
42 | //usage: ) | ||
43 | //usage: | ||
44 | //usage:#define touch_example_usage | ||
45 | //usage: "$ ls -l /tmp/foo\n" | ||
46 | //usage: "/bin/ls: /tmp/foo: No such file or directory\n" | ||
47 | //usage: "$ touch /tmp/foo\n" | ||
48 | //usage: "$ ls -l /tmp/foo\n" | ||
49 | //usage: "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n" | ||
50 | |||
22 | /* This is a NOFORK applet. Be very careful! */ | 51 | /* This is a NOFORK applet. Be very careful! */ |
23 | 52 | ||
24 | /* coreutils implements: | 53 | /* coreutils implements: |