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