#!/bin/sh

# Another simple wrapper script.  This time for scrollkeeper-rebuilddb
# This one is slightly more complex in that we have to run a command!
# We also need to pull out the paths from the relevant place first.

prefix=/usr/local
exec_prefix=/usr/local
bindir=/usr/local/bin
convert_dir=/usr/local/share/omf
datarootdir=/usr/local/share
statedir=/var/db/rarian
datadir=/usr/local/share
output_dir=${datadir}/help
package_version=0.8.1
convert_string="REPLACEME"

if [ ! 1 ]
then

if [ -e $statedir/rarian-update-mtimes ]
then
    for x in $(grep -e '^0:@:' $statedir/rarian-update-mtimes)
    do
	if [ $convert_string != "REPLACEME" ]
	then
	    convert_string=$convert_string:${x##0:@:}
	else
	    convert_string=${x##0:@:}
	fi
    done
else
    convert_string=$convert_dir
fi

$bindir/rarian-sk-update -v --clean-index -o $convert_string

fi