#!/bin/sh
#                                                               Ingrid Yao
#    check_load
#
#        This program check product lines from stdin to stdout that correspond
#        to products that have a file ending in ok. If all product lines have
#        correspond products.ok file then return 0, otherwise echo product names.
#
# input
#       Proot (env variable)
#
#############################################################################
#
#	Copyright (C) Cadence Design Systems, Inc. All rights
#	reserved.  Unpublished -- rights reserved under the
#	copyright laws of the United States of America.
#
#			RESTRICTED RIGHTS LEGEND
#	Use, duplication, or disclosure by the Government is subject
#	to restrictions as set forth in subparagraph (c)(l)(ii) of 
#	the Rights in Technical Data and Computer Software clause 
#	at DFARS 52.227-7013.
#
#			Cadence Design Systems, Inc.
#			555 River Oaks Parkway
#			San Jose, CA 95134	USA
#
#############################################################################

if [ -z "$Proot" ]; then
    echo "$0 environment not initialized"                               1>&2
    exit 1
fi

Root="$Proot/install/pdts"

while read pdtdesc pkgname pdtname pdtsize platform FMrelease; do
    pdtRoot="$Root/${pdtname}_${platform}_${FMrelease}"
    test -f $pdtRoot.ok || exit 1
done
exit 0

