#!/bin/sh
#
#  file:  do-patent patent_data_file
#  auth:  Brad Burdick
#  desc:  process weekly patent data feed
#
##########################################################################
#  Copyright (c) 1994, 1995 Internet Multicasting Service
#
#  The Patent APS/Full-Text Dissemination processing software ("software")
#  was developed by the Internet Multicasting Service and may 
#  be used for academic, research, government, and internal business
#  purposes without charge.  You may not resell this code or include it
#  in a product that you are selling without prior permission of the
#  Internet Multicasting Service.
#
#  This software is provided ``as is'', without express or implied
#  warranty, and with no support nor obligation to assist in its
#  use, correction, modification or enhancement.  We assume no liability
#  with respect to the infringement of copyrights, trade secrets, or any
#  patents, and are not responsible for consequential damages.  Proper
#  use of the software is entirely the responsibility of the user.
##########################################################################

main() {
	# go to patent area
	cd /in/patent

	# split up the patent tape archive
	/usr/local/ims/bin/extract-patent ${1}

	# go to patent work area
	cd /in/patent/work
	for d in * ; do
		(cd $d ; /usr/local/ims/bin/process-patent -a *.nc) &
	done
}

if [ $# -ne 1 ] ; then
	echo "usage: $0 patent_data_file"
	exit 1
fi

main ${1+"$@"}

exit 0

