[BusyBox] (no subject)
Christophe Boyanique
totof at raceme.org
Wed Mar 14 11:11:55 UTC 2001
Hello,
Here is a patch against the current cvs. It adds a fake applet egrep that
is an alias to grep. It increases the size of busybox about 54 bytes (with
trivial help defined) and is disabled by default.
I made this one because lots of script expect egrep to work and I cannot
modify all of them...
Christophe.
-------------- next part --------------
diff -ur busybox.orig/Config.h busybox/Config.h
--- busybox.orig/Config.h Wed Mar 14 02:16:41 2001
+++ busybox/Config.h Wed Mar 14 12:05:21 2001
@@ -329,6 +329,9 @@
// Support for the -A -B and -C context flags in grep
//#define BB_FEATURE_GREP_CONTEXT
//
+// Support for the EGREP applet (alias to the grep applet)
+//#define BB_FEATURE_GREP_EGREP_ALIAS
+//
// Tell tftp what commands that should be supported.
#define BB_FEATURE_TFTP_PUT
#define BB_FEATURE_TFTP_GET
Only in busybox: applet_source_list
diff -ur busybox.orig/applets.h busybox/applets.h
--- busybox.orig/applets.h Mon Mar 12 23:51:50 2001
+++ busybox/applets.h Wed Mar 14 11:59:10 2001
@@ -125,6 +125,9 @@
#ifdef BB_ECHO
APPLET(echo, echo_main, _BB_DIR_BIN)
#endif
+#if defined(BB_FEATURE_GREP_EGREP_ALIAS) && defined(BB_GREP)
+ APPLET(egrep, grep_main, _BB_DIR_BIN)
+#endif
#ifdef BB_EXPR
APPLET(expr, expr_main, _BB_DIR_USR_BIN)
#endif
diff -ur busybox.orig/usage.h busybox/usage.h
--- busybox.orig/usage.h Tue Mar 13 01:40:19 2001
+++ busybox/usage.h Wed Mar 14 12:01:04 2001
@@ -344,6 +344,9 @@
"\t-v\tselect non-matching lines\n" \
"\t-s\tsuppress file open/read error messages"
+#define egrep_trivial_usage grep_trivial_usage
+#define egrep_full_usage grep_full_usage
+
#define gunzip_trivial_usage \
"[OPTION]... FILE"
#define gunzip_full_usage \
More information about the busybox
mailing list