#!/bin/bash
startName=`dirname "$0"`
startName=`readlink -m "$startName"`
OO=/home/SMCDev/omniORB/Ubuntu
export LD_LIBRARY_PATH="$startName:$OO/lib:/usr/local/boost/1.54.0/lib"
export PATH="$startName:$OO/bin:$PATH"

if [ -f children.txt ]
then
  echo "children.txt file still exists: is there an existing invocation still running?"
  exit 1
fi

echo "Starting omniNames"
omniNames -start -always &
echo "$!" >> children.txt
sleep 1

for project in $*
do
	echo "Starting $project"
	./$project $STDARGS &
	echo "$!" >> children.txt
	sleep 1
done


