(|l)gpl-2.[01].tex: Remove the `\renewcommand{\theenumi}...' comments.
[cfd] / mdw-setup
index f60a45e..e4513e0 100755 (executable)
--- a/mdw-setup
+++ b/mdw-setup
@@ -29,7 +29,7 @@ set -e
 ###--------------------------------------------------------------------------
 ### Basic setup stuff.
 
-ego=$(echo "$0" | sed 's:^.*[/\\]::; s:\.*$::')
+ego=${0##*[/\\]}; ego=${ego%%.*}
 usage="Usage: $ego"
 
 ###--------------------------------------------------------------------------
@@ -78,7 +78,7 @@ done
 if [ "$configure" ]; then
   grep >/dev/null AM_PROG_LIBTOOL $configure && libtoolize -f
   find . -name Makefile.m4 -print | while read m4; do
-    dir=$(echo $m4 | sed 's:/[^/]*$::')
+    dir=${m4%/*}
     (cd $dir &&
      m4 Makefile.m4 >Makefile.am.new &&
      mv Makefile.am.new Makefile.am)
@@ -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