Home | History | Annotate | Line # | Download | only in sets
checkflist revision 1.12
      1   1.3  mikel #! /bin/sh --
      2   1.3  mikel #
      3  1.12    abs #	$NetBSD: checkflist,v 1.12 2000/01/06 21:03:34 abs Exp $
      4   1.3  mikel #
      5   1.3  mikel # Verify output of makeflist against contents of $DESTDIR.
      6   1.1    cgd 
      7   1.3  mikel [ "$DESTDIR" ] || {
      8   1.1    cgd 	echo DESTDIR must be set
      9   1.1    cgd 	exit 1
     10   1.3  mikel }
     11   1.1    cgd 
     12   1.9   ross origin=.
     13   1.9   ross tmpname=/tmp/_CHECK.$$
     14  1.10  perry 
     15  1.10  perry xargs=""
     16  1.10  perry dargs=""
     17  1.12    abs diffargs=""
     18  1.10  perry 
     19  1.10  perry # handle args
     20  1.10  perry while : ; do
     21  1.10  perry 	case $1 in
     22  1.10  perry 	-x11)
     23  1.10  perry 		xargs="-x"
     24  1.10  perry 		origin=./usr/X11R6
     25  1.10  perry 		;;
     26  1.10  perry 	-both)
     27  1.10  perry 		xargs="-b"
     28  1.10  perry 		;;
     29  1.10  perry 	-secr)
     30  1.10  perry 		dargs="-d"
     31  1.10  perry 		;;
     32  1.11    mrg 	-cryptint)
     33  1.11    mrg 		dargs="-i"
     34  1.11    mrg 		;;
     35  1.12    abs 	-u)
     36  1.12    abs 		diffargs="-u"
     37  1.12    abs 		;;
     38  1.12    abs 	-c)
     39  1.12    abs 		diffargs="-c"
     40  1.12    abs 		;;
     41  1.10  perry 	-*)
     42  1.10  perry 		cat 1>&2 <<USAGE
     43  1.10  perry Usage: $0 [-x11|-both] [-secr]
     44  1.10  perry 	-x11		check only x11 lists
     45  1.10  perry 	-both		check netbsd + x11 lists
     46  1.10  perry 	-secr		check domestic ("secr") lists
     47  1.11    mrg 	-cryptint	check international crypto ("cryptint") lists
     48  1.12    abs 	-u		output differences in "unified diff" style
     49  1.12    abs 	-c		output differences in "context diff" style
     50  1.10  perry USAGE
     51  1.10  perry 		exit 1
     52  1.10  perry 		;;
     53  1.10  perry 	*)
     54  1.10  perry 		break
     55  1.10  perry 		;;
     56  1.10  perry 	esac
     57  1.10  perry 	shift
     58  1.10  perry done
     59  1.10  perry 
     60  1.10  perry sh makeflist $xargs $dargs > $tmpname
     61  1.10  perry 
     62   1.9   ross ( cd $DESTDIR ; find $origin \( -type d -o -type f -o -type l \) ) | sort | \
     63  1.12    abs     diff $diffargs $tmpname -
     64   1.9   ross /bin/rm -f $tmpname
     65