changeset 1612:470aa609c7e4

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 1c66ca4f3791
children caa9bb54dfa0
files ifndef_wrapper.sh
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ifndef_wrapper.sh	Tue Feb 27 22:21:48 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/'