summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-07-24 20:19:05 +0800
committerMatt Johnston <matt@ucc.asn.au>2018-07-24 20:19:05 +0800
commit5ca12d8332f82afd5df9df7a9894d291a5e1c884 (patch)
tree200dde4c7120b79a41472c8f8530f43a2b4f6849
parent64bd345a5d11e159ac74d45bd009f98ff1a50cf9 (diff)
avoid extended regex features to avoid caring about sed -r vs -E
-rwxr-xr-xifndef_wrapper.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/ifndef_wrapper.sh b/ifndef_wrapper.sh
index e2545d4..37a208d 100755
--- a/ifndef_wrapper.sh
+++ b/ifndef_wrapper.sh
@@ -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/'