#!/bin/sh

#### THE SPOOL DIR IS "/home/lenny/rpm/tmp/wwwoffle-2.6d-root/var/spool/wwwoffle" IN THE LINE BELOW ####

wwwoffle_spool=/home/lenny/rpm/tmp/wwwoffle-2.6d-root/var/spool/wwwoffle

####

# Set the path to include the indexer executable

PATH=$PATH:/usr/local/bin
export PATH

# Set up a log file.

echo > $wwwoffle_spool/html/search/udmsearch/wwwoffle-udmsearch.log

# Create the list of lasttime URLs.

( cd $wwwoffle_spool && wwwoffle-ls lasttime > html/search/udmsearch/wwwoffle-lasttime.log )

# Do the indexing

indexer -S $wwwoffle_spool/html/search/udmsearch/conf/indexer-incr.conf \
    >> $wwwoffle_spool/html/search/udmsearch/wwwoffle-udmsearch.log 2>&1

indexer -a -f $wwwoffle_spool/html/search/udmsearch/wwwoffle-lasttime.log \
    $wwwoffle_spool/html/search/udmsearch/conf/indexer-incr.conf \
    >> $wwwoffle_spool/html/search/udmsearch/wwwoffle-udmsearch.log 2>&1

indexer -S $wwwoffle_spool/html/search/udmsearch/conf/indexer-incr.conf \
    >> $wwwoffle_spool/html/search/udmsearch/wwwoffle-udmsearch.log 2>&1

indexer -i -f $wwwoffle_spool/html/search/udmsearch/wwwoffle-lasttime.log \
    $wwwoffle_spool/html/search/udmsearch/conf/indexer-incr.conf \
    >> $wwwoffle_spool/html/search/udmsearch/wwwoffle-udmsearch.log 2>&1

indexer -S $wwwoffle_spool/html/search/udmsearch/conf/indexer-incr.conf \
    >> $wwwoffle_spool/html/search/udmsearch/wwwoffle-udmsearch.log 2>&1
