#!/bin/bash
# Set environment variables for test scripts.

pathmunge () {
    if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
	if [ "$2" = "after" ] ; then
	    PATH=$PATH:$1
	else
	    PATH=$1:$PATH
	fi
    fi
}

if [ -z QPID_ROOT ] ; then echo "You must set QPID_ROOT" ; fi
 
pathmunge $QPID_ROOT/cpp/tests
# pathmunge $QPID_ROOT/cpp/build/*/bin
# pathmunge $QPID_ROOT/cpp/build/*/test

export QPID_HOME=${QPID_HOME:-$QPID_ROOT/java/build}
pathmunge $QPID_HOME/bin


