X-Git-Url: https://git.distorted.org.uk/~mdw/cfd/blobdiff_plain/ba4d97a46a046f5170b58a29c8f1c0524c63694c..60e6fde89a2e73210de48cd56b1c022f9aeec2b6:/mdw-setup diff --git a/mdw-setup b/mdw-setup index f60a45e..e4513e0 100755 --- 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