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