checkflist revision 1.11
11.3Smikel#! /bin/sh --
21.3Smikel#
31.11Smrg#	$NetBSD: checkflist,v 1.11 1999/11/27 13:10:45 mrg Exp $
41.3Smikel#
51.3Smikel# Verify output of makeflist against contents of $DESTDIR.
61.1Scgd
71.3Smikel[ "$DESTDIR" ] || {
81.1Scgd	echo DESTDIR must be set
91.1Scgd	exit 1
101.3Smikel}
111.1Scgd
121.9Srossorigin=.
131.9Srosstmpname=/tmp/_CHECK.$$
141.10Sperry
151.10Sperryxargs=""
161.10Sperrydargs=""
171.10Sperry
181.10Sperry# handle args
191.10Sperrywhile : ; do
201.10Sperry	case $1 in
211.10Sperry	-x11)
221.10Sperry		xargs="-x"
231.10Sperry		origin=./usr/X11R6
241.10Sperry		;;
251.10Sperry	-both)
261.10Sperry		xargs="-b"
271.10Sperry		;;
281.10Sperry	-secr)
291.10Sperry		dargs="-d"
301.10Sperry		;;
311.11Smrg	-cryptint)
321.11Smrg		dargs="-i"
331.11Smrg		;;
341.10Sperry	-*)
351.10Sperry		cat 1>&2 <<USAGE
361.10SperryUsage: $0 [-x11|-both] [-secr]
371.10Sperry	-x11		check only x11 lists
381.10Sperry	-both		check netbsd + x11 lists
391.10Sperry	-secr		check domestic ("secr") lists
401.11Smrg	-cryptint	check international crypto ("cryptint") lists
411.10SperryUSAGE
421.10Sperry		exit 1
431.10Sperry		;;
441.10Sperry	*)
451.10Sperry		break
461.10Sperry		;;
471.10Sperry	esac
481.10Sperry	shift
491.10Sperrydone
501.10Sperry
511.10Sperrysh makeflist $xargs $dargs > $tmpname
521.10Sperry
531.9Sross( cd $DESTDIR ; find $origin \( -type d -o -type f -o -type l \) ) | sort | \
541.9Sross    diff $tmpname -
551.9Sross/bin/rm -f $tmpname
56