[Toybox] [PATCH 2/2] macOS: use -E rather than -r for sed extended regular expressions.

enh enh at google.com
Wed Nov 28 12:16:40 PST 2018


GNU sed supports -E, -r, and --regexp-extended. BSD sed only supports
-r.
---
 scripts/genconfig.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/genconfig.sh b/scripts/genconfig.sh
index 533df60..3887b07 100755
--- a/scripts/genconfig.sh
+++ b/scripts/genconfig.sh
@@ -144,7 +144,7 @@ genconfig > generated/Config.in || rm generated/Config.in
 toys()
 {
   grep 'TOY(.*)' "$@" | grep -v TOYFLAG_NOFORK | grep -v "0))" | \
-    sed -rn 's/([^:]*):.*(OLD|NEW)TOY\( *([a-zA-Z][^,]*) *,.*/\1:\3/p'
+    sed -En 's/([^:]*):.*(OLD|NEW)TOY\( *([a-zA-Z][^,]*) *,.*/\1:\3/p'
 }

 WORKING=
-- 
2.20.0.rc0.387.gc7a69e6b6c-goog
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-macOS-use-E-rather-than-r-for-sed-extended-regular-e.patch
Type: text/x-patch
Size: 886 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20181128/09526b92/attachment.bin>


More information about the Toybox mailing list