1997-02-18 09:58:56 +03:00
|
|
|
#! /bin/sh --
|
|
|
|
#
|
2000-06-20 10:00:24 +04:00
|
|
|
# $NetBSD: checkflist,v 1.13 2000/06/20 06:00:28 thorpej Exp $
|
1997-02-18 09:58:56 +03:00
|
|
|
#
|
|
|
|
# Verify output of makeflist against contents of $DESTDIR.
|
1994-08-29 19:21:02 +04:00
|
|
|
|
1997-02-18 09:58:56 +03:00
|
|
|
[ "$DESTDIR" ] || {
|
1994-08-29 19:21:02 +04:00
|
|
|
echo DESTDIR must be set
|
|
|
|
exit 1
|
1997-02-18 09:58:56 +03:00
|
|
|
}
|
1994-08-29 19:21:02 +04:00
|
|
|
|
1998-07-04 13:27:18 +04:00
|
|
|
origin=.
|
|
|
|
tmpname=/tmp/_CHECK.$$
|
1998-07-22 21:01:43 +04:00
|
|
|
|
|
|
|
xargs=""
|
|
|
|
dargs=""
|
2000-01-07 00:03:34 +03:00
|
|
|
diffargs=""
|
1998-07-22 21:01:43 +04:00
|
|
|
|
|
|
|
# handle args
|
|
|
|
while : ; do
|
|
|
|
case $1 in
|
|
|
|
-x11)
|
|
|
|
xargs="-x"
|
|
|
|
origin=./usr/X11R6
|
|
|
|
;;
|
|
|
|
-both)
|
|
|
|
xargs="-b"
|
|
|
|
;;
|
2000-01-07 00:03:34 +03:00
|
|
|
-u)
|
|
|
|
diffargs="-u"
|
|
|
|
;;
|
|
|
|
-c)
|
|
|
|
diffargs="-c"
|
|
|
|
;;
|
1998-07-22 21:01:43 +04:00
|
|
|
-*)
|
|
|
|
cat 1>&2 <<USAGE
|
|
|
|
Usage: $0 [-x11|-both] [-secr]
|
|
|
|
-x11 check only x11 lists
|
|
|
|
-both check netbsd + x11 lists
|
2000-01-07 00:03:34 +03:00
|
|
|
-u output differences in "unified diff" style
|
|
|
|
-c output differences in "context diff" style
|
1998-07-22 21:01:43 +04:00
|
|
|
USAGE
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
sh makeflist $xargs $dargs > $tmpname
|
|
|
|
|
1998-07-04 13:27:18 +04:00
|
|
|
( cd $DESTDIR ; find $origin \( -type d -o -type f -o -type l \) ) | sort | \
|
2000-01-07 00:03:34 +03:00
|
|
|
diff $diffargs $tmpname -
|
1998-07-04 13:27:18 +04:00
|
|
|
/bin/rm -f $tmpname
|