-# $Id: test2.sh,v 1.6 2003-05-21 14:39:22 adam Exp $
-echo "Testing with storekeys (zebra2.cfg)"
-echo "init..."
-rm -f idx.log log
-rm -f records/esdd000[12].grs # these should not be here, will be created later
-../../index/zebraidx -l idx.log -c zebra2.cfg init || exit 1
-
-echo "update 1..."
-../../index/zebraidx -l idx.log -c zebra2.cfg update records || exit 1
-
-echo "update 2..."
-../../index/zebraidx -l idx.log -c zebra2.cfg update records || exit 1
-
-echo "killing old server (if any)..."
-test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid`
-rm -f zebrasrv.pid
-rm -f srv.log
-
-echo "starting server..."
-../../index/zebrasrv -S -c zebra2.cfg -l srv.log tcp:@:9901 &
-sleep 1
-test -f zebrasrv.pid || exit 1
+# $Id: test2.sh,v 1.13 2005-01-03 12:08:04 adam Exp $
+
+pp=${srcdir:-"."}
+
+LOG=test2.log
+
+rm -f $LOG
+echo "init..." >>$LOG
+rm -f $pp/records/esdd000[12].grs # these should not be here, will be created later
+../../index/zebraidx -l $LOG -c $pp/zebra2.cfg init || exit 1
+
+echo "update 1..." >>$LOG
+../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1