Home | History | Annotate | Line # | Download | only in sets
checkflist revision 1.10
      1 #! /bin/sh --
      2 #
      3 #	$NetBSD: checkflist,v 1.10 1998/07/22 17:01:43 perry Exp $
      4 #
      5 # Verify output of makeflist against contents of $DESTDIR.
      6 
      7 [ "$DESTDIR" ] || {
      8 	echo DESTDIR must be set
      9 	exit 1
     10 }
     11 
     12 origin=.
     13 tmpname=/tmp/_CHECK.$$
     14 
     15 xargs=""
     16 dargs=""
     17 
     18 # handle args
     19 while : ; do
     20 	case $1 in
     21 	-x11)
     22 		xargs="-x"
     23 		origin=./usr/X11R6
     24 		;;
     25 	-both)
     26 		xargs="-b"
     27 		;;
     28 	-secr)
     29 		dargs="-d"
     30 		;;
     31 	-*)
     32 		cat 1>&2 <<USAGE
     33 Usage: $0 [-x11|-both] [-secr]
     34 	-x11		check only x11 lists
     35 	-both		check netbsd + x11 lists
     36 	-secr		check domestic ("secr") lists
     37 USAGE
     38 		exit 1
     39 		;;
     40 	*)
     41 		break
     42 		;;
     43 	esac
     44 	shift
     45 done
     46 
     47 sh makeflist $xargs $dargs > $tmpname
     48 
     49 ( cd $DESTDIR ; find $origin \( -type d -o -type f -o -type l \) ) | sort | \
     50     diff $tmpname -
     51 /bin/rm -f $tmpname
     52