#!/bin/sh

if [ "X$EPICS_BASE" = "X" ]; then
    echo "Environment variable EPICS_BASE not set."
    exit 1
fi

if [ "X$EPICS_HOST_ARCH" = "X" ]; then
    EPICS_HOST_ARCH=`$EPICS_BASE/startup/EpicsHostArch`
    if [ "X$EPICS_HOST_ARCH" = "X" ]; then
        echo "Environment variable EPICS_HOST_ARCH not set, failed to auto-detect."
        exit 1
    fi
    echo "Environment variable EPICS_HOST_ARCH not set, detected $EPICS_HOST_ARCH."
fi

# testServer
echo "Starting pvAccess C++ test server..."
./bin/$EPICS_HOST_ARCH/testServer $*
