#!/bin/bash
target="`dirname \"$0\"`"
pwd=`pwd`
echo "$target" | grep "^/"
if [ "$0" != "0" ]; then
  # no leading slash, therefore no absolute path; prepend pwd
  target="$pwd/$target"
fi
target=c:/cygwin/home/user/git/java/target
echo target is $target
cd "$target/../com.sap.sailing.feature.p2build/bin/products/raceanalysis.product.id/win32/win32/x86_64"
echo pwd is now `pwd`
classpath="`find plugins -name 'com.sap.sailing.expeditionconnector_*.jar' | sort | tail -1`;`find plugins -name 'com.sap.sailing.domain.common_*.jar' | sort | tail -1`"
echo Using classpath $classpath
"$JAVA_HOME/bin/java" -cp "$classpath" -Djava.util.logging.config.file=$target/configuration/logging.properties com.sap.sailing.expeditionconnector.FromHttpToUdpMirror $*
