1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
#!/bin/sh
#
# The 'defs' file enables to factor out the common definitions from
# each of the test files.
#
# Borrowed from GNU Autotools book, Ch. 11.4, p 144
#
# $Id: defs,v 1.2 2005/08/19 03:18:28 vlg Exp $
# Make sure srcdir is an absolute path.
log="`pwd`/defs.log"
srcdir=${srcdir-.}
if test ! -d $srcdir ; then
exit 1
fi
# If the source directory is a Unix directory...
case "$srcdir" in
/* | [A-Za-z]:\\*) ;;
*) srcdir=`\cd $srcdir && pwd` ;;
esac
case "$topbuilddir" in
/* | [A-Za-z]:\\*) ;;
*) top_builddir=`\cd ${topbuilddir-..} && pwd` ;;
esac
programname=`echo "$0" | sed 's,^.*/,,'`
testname=`echo "$programname" | sed 's,-.*$,,'`
testsubdir=${testsubdir-testSubDir}
# User can set VERBOSE to prevent output redirection
case x$VERBOSE in
xNO | xno | x0 | x)
exec > /dev/null 2>&1
;;
esac
rm -rf $testsubdir > /dev/null 2>&1
mkdir $testsubdir
cd $testsubdir \
|| { echo "Cannot make or change into $testsubdir"; exit 1; }
CMP="${CMP-cmp}"
# Here you can also setup environment variables
# such as PORTNUM, for example.
export ASSAPORT=10100
echo "ASSAPORT=$ASSAPORT"
|