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