#!/bin/sh
#
#   Copyright (c) 1988-1993 Frame Technology Corp. All rights reserved.
#
#   $Id: fm_indexdocs,v 1.3 1993/10/04 23:35:09 holmberg Exp $
#
# Starts maker, calls client TakeControl function, which starts indexing
# on $FM_SCRIPT_FILE and exits when it's done.

case $# in
1)
    ;;
*)
    echo "Usage: fm_indexdocs <filename of index script document>"
    echo "Starts Maker and runs the indexing client on the given script."
    exit 1;
    ;;
esac

FM_SCRIPT_FILE="$1"
export FM_SCRIPT_FILE

if test -r "$FM_SCRIPT_FILE" ; then
    exec maker -server -apiclient txtindex
else
    echo "File \"$FM_SCRIPT_FILE\" does not exist.  Not starting Maker."
fi
