1 #! /bin/sh -- 2 # 3 # $NetBSD: checkflist,v 1.12 2000/01/06 21:03:34 abs 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 diffargs="" 18 19 # handle args 20 while : ; do 21 case $1 in 22 -x11) 23 xargs="-x" 24 origin=./usr/X11R6 25 ;; 26 -both) 27 xargs="-b" 28 ;; 29 -secr) 30 dargs="-d" 31 ;; 32 -cryptint) 33 dargs="-i" 34 ;; 35 -u) 36 diffargs="-u" 37 ;; 38 -c) 39 diffargs="-c" 40 ;; 41 -*) 42 cat 1>&2 <<USAGE 43 Usage: $0 [-x11|-both] [-secr] 44 -x11 check only x11 lists 45 -both check netbsd + x11 lists 46 -secr check domestic ("secr") lists 47 -cryptint check international crypto ("cryptint") lists 48 -u output differences in "unified diff" style 49 -c output differences in "context diff" style 50 USAGE 51 exit 1 52 ;; 53 *) 54 break 55 ;; 56 esac 57 shift 58 done 59 60 sh makeflist $xargs $dargs > $tmpname 61 62 ( cd $DESTDIR ; find $origin \( -type d -o -type f -o -type l \) ) | sort | \ 63 diff $diffargs $tmpname - 64 /bin/rm -f $tmpname 65