#! /bin/csh -f
#
# Executed by the KIT program to update kit database using
# $GENESIS_EDIR/all/remote_kit program. 
#
#
# AD 26 Jun 2001
#

set infile = $1 
set outfile = $2


## Allow for hook overide: The following "if"s series will run 
## an alternative "remote_kit_increment" if it exists.
##
## NOTE: If an alternative "remote_kit_increment" exists,
##       it must not contain these "if"s, because they
##	 will result in an infinite loop - out of memory error,
##	 when the alternative will call itself.


if ($?home) then
	if ( -e $home/.genesis/hooks/remote_kit_increment) then
		$home/.genesis/hooks/remote_kit_increment $infile $outfile
		exit
	endif
endif

if ($?HOST) then
	if (-e $GENESIS_DIR/hosts/$HOST/hooks/remote_kit_increment ) then
		$GENESIS_DIR/hosts/$HOST/hooks/remote_kit_increment $infile $outfile
		exit
	endif

endif 

if  (-e $GENESIS_DIR/sys/hooks/remote_kit_increment ) then
	$GENESIS_DIR/sys/hooks/remote_kit_increment $infile $outfile
	exit
	
endif



if ($GENESIS_EDIR =~ /* || $GENESIS_EDIR =~ ?:*) then
   set path_kit_remote = $GENESIS_EDIR/misc/kit_remote
else
   set path_kit_remote = $GENESIS_DIR/$GENESIS_EDIR/misc/kit_remote
endif

#
# In order to communicate via a proxy server you must add
# the parameter -p<proxy server>[:<proxy port>]
# the default proxy port is 80.
# e.g
# $path_kit_remote -ukit.frontline-pcb.com/cgi-bin/kit_increment.pl -pproxy.com -i$infile -o$outfile
# or
# $path_kit_remote -ukit.frontline-pcb.com/cgi-bin/kit_increment.pl -pproxy.com:8080 -i$infile -o$outfile
#
# If the proxy server requires a user/password authorization use the 
# -c<user>:<password> parameter.
#
#

$path_kit_remote -ukit.frontline-pcb.com/cgi-bin/kit_increment.pl -i$infile -o$outfile
