#!/usr/local/bin/perl -w
require "Util.pm";
use strict;

# From this script, run the isrch_fetch utility and pass 4 arguments:
#
# isrch_fetch <databases_path> $1 $2 $3
#
# /path/to/Isearch-cgi/isrch_fetch /path/to/my/databases


unless (@ARGV){
    Util->PrintHeader();
    Util->ErrorMessage("This script <strong>MUST</strong>".
	" be called with four argument. Please contact the <strong>RIB".
	" </strong>maintainers.");
}

my $ipath = Util->GetRibDir() . "/repositories/" . $ARGV[0] . 
    "/index/";
#print $ipath;

my $cpath = "/rib-test/repositories/" . $ARGV[0] .
    "/catalog/";    

$ENV{'DOCUMENT_ROOT'} = "$cpath"; 
exec './isrch_fetch', $ipath, @ARGV;
