[PATCH 2/2] Adds Kbuild, Config and applets.src.h infrastructure for shuf.
Bartosz Golaszewski
bartekgola at gmail.com
Thu Feb 27 21:22:20 UTC 2014
Signed-off-by: Bartosz Golaszewski <bartekgola at gmail.com>
---
coreutils/Config.src | 6 ++++++
coreutils/Kbuild.src | 1 +
include/applets.src.h | 1 +
3 files changed, 8 insertions(+)
diff --git a/coreutils/Config.src b/coreutils/Config.src
index 33defa4..ce5735e 100644
--- a/coreutils/Config.src
+++ b/coreutils/Config.src
@@ -520,6 +520,12 @@ config SHA3SUM
help
Compute and check SHA3 (512-bit) message digest
+config SHUF
+ bool "shuf"
+ default y
+ help
+ Generate random permutations
+
config SLEEP
bool "sleep"
default y
diff --git a/coreutils/Kbuild.src b/coreutils/Kbuild.src
index ec4ef7d..345d4f8 100644
--- a/coreutils/Kbuild.src
+++ b/coreutils/Kbuild.src
@@ -62,6 +62,7 @@ lib-$(CONFIG_SHA1SUM) += md5_sha1_sum.o
lib-$(CONFIG_SHA256SUM) += md5_sha1_sum.o
lib-$(CONFIG_SHA512SUM) += md5_sha1_sum.o
lib-$(CONFIG_SHA3SUM) += md5_sha1_sum.o
+lib-$(CONFIG_SHUF) += shuf.o
lib-$(CONFIG_SLEEP) += sleep.o
lib-$(CONFIG_SPLIT) += split.o
lib-$(CONFIG_SORT) += sort.o
diff --git a/include/applets.src.h b/include/applets.src.h
index 7dbd4c7..dae8de6 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -319,6 +319,7 @@ IF_SHA3SUM(APPLET_NOEXEC(sha3sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sh
IF_SHA256SUM(APPLET_NOEXEC(sha256sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha256sum))
IF_SHA512SUM(APPLET_NOEXEC(sha512sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha512sum))
IF_SHOWKEY(APPLET(showkey, BB_DIR_USR_BIN, BB_SUID_DROP))
+IF_SHUF(APPLET_NOEXEC(shuf, shuf, BB_DIR_USR_BIN, BB_SUID_DROP, shuf))
IF_SLATTACH(APPLET(slattach, BB_DIR_SBIN, BB_SUID_DROP))
/* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells: */
IF_SLEEP(APPLET(sleep, BB_DIR_BIN, BB_SUID_DROP))
--
1.8.4.5
More information about the busybox
mailing list