#!/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"