Home | History | Annotate | Line # | Download | only in sets
checkflist revision 1.13
      1   1.3    mikel #! /bin/sh --
      2   1.3    mikel #
      3  1.13  thorpej #	$NetBSD: checkflist,v 1.13 2000/06/20 06:00:28 thorpej 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.12      abs 	-u)
     30  1.12      abs 		diffargs="-u"
     31  1.12      abs 		;;
     32  1.12      abs 	-c)
     33  1.12      abs 		diffargs="-c"
     34  1.12      abs 		;;
     35  1.10    perry 	-*)
     36  1.10    perry 		cat 1>&2 <<USAGE
     37  1.10    perry Usage: $0 [-x11|-both] [-secr]
     38  1.10    perry 	-x11		check only x11 lists
     39  1.10    perry 	-both		check netbsd + x11 lists
     40  1.12      abs 	-u		output differences in "unified diff" style
     41  1.12      abs 	-c		output differences in "context diff" style
     42  1.10    perry USAGE
     43  1.10    perry 		exit 1
     44  1.10    perry 		;;
     45  1.10    perry 	*)
     46  1.10    perry 		break
     47  1.10    perry 		;;
     48  1.10    perry 	esac
     49  1.10    perry 	shift
     50  1.10    perry done
     51  1.10    perry 
     52  1.10    perry sh makeflist $xargs $dargs > $tmpname
     53  1.10    perry 
     54   1.9     ross ( cd $DESTDIR ; find $origin \( -type d -o -type f -o -type l \) ) | sort | \
     55  1.12      abs     diff $diffargs $tmpname -
     56   1.9     ross /bin/rm -f $tmpname
     57