#!/usr/local/bin/perl
# -----------------------------------------------------------------
# bdmanualb
# 
# Author: Mic Bowman
#
# Perform a manual update of the server description file.
# -----------------------------------------------------------------
$ENV{'HARVEST_HOME'} = "/usr/local/harvest"
	if (!defined($ENV{'HARVEST_HOME'}));
$ENV{"HSR_HOME"} = "$ENV{'HARVEST_HOME'}/gatherers/HSR";
push(@INC,$ENV{"HSR_HOME"} . "/lib");
require 'bdlibrary.pl';
require 'cgi.pl';
require 'hsrlibrary.pl';

# -----------------------------------------------------------------
# Main
# -----------------------------------------------------------------
sub Main
{
    local($stype,$sfile,$shome) = @ARGV;
    local(%obj,%tags,%dlist);
    local($filename);

    # Initialize
    &HSR_Initialize;

    # Make sure the file is in the descriptions home directory
    &CGIError("Invalid description file: $sfile")
	if (index($sfile,$Config{"Descriptions.Home"}) != 0);

    &CGIError("Unable to read description file $sfile")
	if (! -r $sfile);

    &HSR_DisplayDescription($sfile);
}

# -----------------------------------------------------------------
&Main;
exit(0);
