NetBSD/distrib/sets/checkflist

56 lines
837 B
Bash
Executable File

#! /bin/sh --
#
# $NetBSD: checkflist,v 1.11 1999/11/27 13:10:45 mrg Exp $
#
# Verify output of makeflist against contents of $DESTDIR.
[ "$DESTDIR" ] || {
echo DESTDIR must be set
exit 1
}
origin=.
tmpname=/tmp/_CHECK.$$
xargs=""
dargs=""
# handle args
while : ; do
case $1 in
-x11)
xargs="-x"
origin=./usr/X11R6
;;
-both)
xargs="-b"
;;
-secr)
dargs="-d"
;;
-cryptint)
dargs="-i"
;;
-*)
cat 1>&2 <<USAGE
Usage: $0 [-x11|-both] [-secr]
-x11 check only x11 lists
-both check netbsd + x11 lists
-secr check domestic ("secr") lists
-cryptint check international crypto ("cryptint") lists
USAGE
exit 1
;;
*)
break
;;
esac
shift
done
sh makeflist $xargs $dargs > $tmpname
( cd $DESTDIR ; find $origin \( -type d -o -type f -o -type l \) ) | sort | \
diff $tmpname -
/bin/rm -f $tmpname