mdw-setup: Fix regexp portability.
authorMark Wooding <mdw@marauder.distorted.org.uk>
Sat, 11 Jun 2011 18:31:53 +0000 (19:31 +0100)
committerMark Wooding <mdw@marauder.distorted.org.uk>
Sat, 11 Jun 2011 18:31:53 +0000 (19:31 +0100)
The `\?' quantifier is a GNU extension.  Apparently \{0,1\} is a more
portable replacement.

mdw-setup

index f60a45e..ab62f09 100755 (executable)
--- a/mdw-setup
+++ b/mdw-setup
@@ -89,7 +89,7 @@ if [ "$configure" ]; then
   autoconf --force
   if grep >/dev/null 'AC_CONFIG_AUX_DIR' $configure; then
     auxdir=$(
-      sed -n 's:^.*AC_CONFIG_AUX_DIR(\[\?\([^])]*\)\]\?).*$:\1:p' $configure)
+      sed -n 's:^.*AC_CONFIG_AUX_DIR(\[\{0,1\}\([^])]*\)\]\{0,1\}).*$:\1:p' $configure)
     mkdir -p $auxdir
   fi
   grep >/dev/null 'A[MC]_CONFIG_HEADER' $configure && autoheader