Implemented loadable filters.
[idzebra-moved-to-github.git] / test / rusmarc / test1.sh
index d57b141..44f18ff 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: test1.sh,v 1.3 2004-06-15 08:06:34 adam Exp $
+# $Id: test1.sh,v 1.6 2004-09-27 10:44:52 adam Exp $
 
 pp=${srcdir:-"."}
 
@@ -8,8 +8,17 @@ rm -f $LOG
 test -d tmp || mkdir tmp
 test -d lock || mkdir lock
 test -d register || mkdir register
-../../index/zebraidx -c $pp/zebra.cfg -l$LOG init
-../../index/zebraidx -c $pp/zebra.cfg -l$LOG update records/*marc
+
+if ../../index/zebraidx -c $pp/zebra.cfg -l $LOG filters|grep grs.marc >/dev/null; then
+        ../../index/zebraidx -c $pp/zebra.cfg -l$LOG init
+else
+        exit 0
+fi
+
+if grep 'UTF-8 to koi8-r unsupported' $LOG >/dev/null; then
+       exit 0
+fi
+../../index/zebraidx -c $pp/zebra.cfg -l$LOG update $pp/records/*marc
 ../../index/zebrasrv -c $pp/zebra.cfg -l$LOG unix:socket &
 sleep 1
 # search text located in first record 600 $a