changeset 1611:0196f4f83fee

avoid extended regex features to avoid caring about sed -r vs -E
author Matt Johnston <matt@ucc.asn.au>
date Tue, 24 Jul 2018 20:19:05 +0800
parents a57822db3eac
children 1fbe598a14fb
files ifndef_wrapper.sh
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ifndef_wrapper.sh	Fri Mar 09 23:16:37 2018 +0800
+++ b/ifndef_wrapper.sh	Tue Jul 24 20:19:05 2018 +0800
@@ -2,6 +2,6 @@
 
 # Wrap all "#define X Y" with a #ifndef X...#endif"
 
-sed -E 's/^( *#define ([^ ]+) .*)/#ifndef \2\
+sed 's/^\( *#define \([^ ][^ ]*\) .*\)/#ifndef \2\
 \1\
 #endif/'