-echo "initializing..."
-mkdir -p reg
-rm -f records/esdd000[12].grs # these should not be here, will be created later
-rm -f idx.log srv.log
-../../index/zebraidx -l idx.log -c zebra1.cfg init || exit 1
+rm -f $LOG
+echo "initializing..." >>$LOG
+test -d reg || mkdir reg
+rm -f $pp/records/esdd000[12].grs # these should not be here, will be created later
+../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1