3 MARCDUMP="yaz-marcdump"
5 if [ "$SOLR_URL" == "" ] ; then
6 DEF_HOST=-Durl="http://localhost:8983/solr/update"
8 DEF_HOST=-Durl="$SOLR_URL"
11 if [ -d "./data" ] ; then
14 LOCDATA=/extra/heikki/locdata
17 if [ ! -d "$LOCDATA" ] ; then
18 echo "$LOCDATA not a directory"
22 if [ "$1" == "" ] ; then
23 FILES="$LOCDATA/part*"
34 echo "zcat $1 > $FILE.mrc"
36 $MARCDUMP -f marc8 -t utf-8 -o turbomarc $FILE.mrc > $FILE.xml
37 xsltproc ../test/tmarc.xsl $FILE.xml > $FILE.pz
38 xsltproc ../etc/pz2-solr.xsl $FILE.pz > $FILE.solr
42 if [ "$TWO_PASS" == "1" ] ; then
43 for d in ${FILES} ; do
44 date "+%c converting $d" >>$LOG
50 for d in ${FILES} ; do
51 date "+%c converting $d" >>$LOG
54 if [ ! -f "$FILE" ] ; then
57 date "+%c indexing $d" >>$LOG
58 java $DEF_HOST -jar post.jar $FILE
59 date "+%c indexing $d ended" >>$LOG
62 date "+%c All done" >>$LOG