Fix spelling and encoding errors in manpages and an error message
[mmh] / test / setup-test
index a99c6c7..ffd9e64 100755 (executable)
@@ -2,23 +2,25 @@
 
 set -e
 
-if TEMPDIR=`cat test-temp-dir 2> /dev/null` \
-   && [ -e $TEMPDIR/bld/Makefile ]; then
-    (cd $TEMPDIR/bld && make all install)
-    exit
+if TEMPDIR="`cat test-temp-dir 2>/dev/null`" \
+               && [ -f "$TEMPDIR/build/Makefile" ]; then
+       (cd "$TEMPDIR/build" && make all install)
+       exit
 fi
 
-TEMPDIR=`mktemp -d /tmp/nmh-test-XXXXXXXX`
-echo $TEMPDIR > test-temp-dir
+TEMPDIR="`mktemp -d /tmp/mmh-test-XXXXXXXX`"
+echo "$TEMPDIR" >test-temp-dir
 
 cd ..
-if ! [ -e configure ]; then
-    ./autogen.sh
+srcdir="$PWD"
+if [ ! -f configure ]; then
+       ./autogen.sh
+fi
+if [ -f Makefile ]; then
+       make -s clean
 fi
-srcdir=$PWD
-mkdir $TEMPDIR/bld
-cd $TEMPDIR/bld
-$srcdir/configure --prefix=$TEMPDIR --with-locking=fcntl --enable-debug
-make install
 
-echo "Path: $TEMPDIR/Mail" > $TEMPDIR/mh_profile
+mkdir "$TEMPDIR/build"
+cd "$TEMPDIR/build"
+"$srcdir/configure" -q --prefix="$TEMPDIR" --enable-debug
+make -s all install