From 5014dada3fa0bb6f6873e28fe6491f0789239cdc Mon Sep 17 00:00:00 2001
From: Denis Vlasenko <vda.linux@googlemail.com>
Date: Wed, 27 Feb 2008 11:54:59 +0000
Subject: script: new applet by Pascal Bellard <pascal.bellard AT ads-lu.com>

---
 include/applets.h | 1 +
 include/libbb.h   | 1 +
 include/usage.h   | 9 +++++++++
 3 files changed, 11 insertions(+)

(limited to 'include')

diff --git a/include/applets.h b/include/applets.h
index b2e89ee85..d4b6dbeaa 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -305,6 +305,7 @@ USE_RUNLEVEL(APPLET(runlevel, _BB_DIR_SBIN, _BB_SUID_NEVER))
 USE_RUNSV(APPLET(runsv, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
 USE_RUNSVDIR(APPLET(runsvdir, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
 USE_RX(APPLET(rx, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+USE_SCRIPT(APPLET(script, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
 USE_SED(APPLET(sed, _BB_DIR_BIN, _BB_SUID_NEVER))
 USE_SELINUXENABLED(APPLET(selinuxenabled, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
 USE_SENDMAIL(APPLET_ODDNAME(sendmail, sendgetmail, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sendmail))
diff --git a/include/libbb.h b/include/libbb.h
index 978cd2d87..707e8d69b 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -237,6 +237,7 @@ extern int recursive_action(const char *fileName, unsigned flags,
 	int (*dirAction) (const char *fileName, struct stat* statbuf, void* userData, int depth),
 	void* userData, unsigned depth);
 extern int device_open(const char *device, int mode);
+extern int getpty(char *line, int size);
 extern int get_console_fd(void);
 extern char *find_block_device(const char *path);
 /* bb_copyfd_XX print read/write errors and return -1 if they occur */
diff --git a/include/usage.h b/include/usage.h
index 95cb69c73..4eac17401 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -3234,6 +3234,15 @@ USE_FEATURE_RUN_PARTS_FANCY("\n	-l	Prints names of all matching files even when
 #define rx_example_usage \
        "$ rx /tmp/foo\n"
 
+#define script_trivial_usage \
+       "[-afq] [-c COMMAND] [OUTFILE]"
+#define script_full_usage \
+       "Options:" \
+     "\n	-a	Append output" \
+     "\n	-c	Run COMMAND, not shell" \
+     "\n	-f	Flush output after each write" \
+     "\n	-q	Quiet"
+
 #define sed_trivial_usage \
        "[-efinr] pattern [files...]"
 #define sed_full_usage \
-- 
cgit v1.2.3