Fix the running of the event examples in their target or stage dir.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 22 Feb 2006 16:22:27 +0000 (16:22 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 22 Feb 2006 16:22:27 +0000 (16:22 +0000)
org.glite.lb.client/examples/gen_begin

index ae9f981..bcc5083 100755 (executable)
@@ -8,7 +8,12 @@ if [ `echo $(basename $0) | grep 'glite-lb-' | wc -l` = "1" ]; then
        PREFIX=glite-lb-
 fi
 LOGFD=${LOGFD:-2}
-LOGEV=${LOGEV:-`dirname $0`/${PREFIX}logevent}${SUFFIX}
+if [ -d `dirname $0`/../bin ]; then
+       BINDIR=`dirname $0`/../bin
+else
+       BINDIR=`dirname $0`
+fi
+LOGEV=${LOGEV:-${BINDIR}/${PREFIX}logevent}${SUFFIX}
 JOB_REG=${JOB_REG:-`dirname $0`/${PREFIX}job_reg}${SUFFIX}
 EDG_JOBID=
 LBPROXY=