:
#ident	"@(#)idvidi	1.2	90/08/16"
#ident "@(#)idvidi	1.2 89/09/29"
#	@(#) idvidi 21.1 89/10/30 
#
#
#	      UNIX is a registered trademark of AT&T
#		Portions Copyright 1976-1989 AT&T
#	Portions Copyright 1980-1989 Microsoft Corporation
#    Portions Copyright 1983-1989 The Santa Cruz Operation, Inc
#		      All Rights Reserved

#
#	idvidi: Shell script to take a sdev and mvdev and
#	make the appropriate information available in
#	the /etc/conf/ directories.
#

case $1 in
	"-r")
		ID=$2 ;;
	"")
		;;
	*)
		echo "Usage: $0 [-r ID]"
		exit 1
		;;
esac

VDIR=${ID}/pack.d/cn
VIDI=${VDIR}/vidimaster

MVDEV=${ID}/cf.d/mvdevice
SDEV=${ID}/sdevice.d

for i in `awk '{ print $1 }' $MVDEV`
do
	grep '^'$i'[	 ]*Y' $SDEV/$i > /dev/null \
		&& grep '^'$i $MVDEV >> $VIDI
done

cd ${VDIR}
$ID/bin/idvdbuild $VIDI
rm -rf $VIDI
