NetBSD/distrib/sets/checkflist

28 lines
577 B
Plaintext
Raw Normal View History

#! /bin/sh --
#
# $NetBSD: checkflist,v 1.9 1998/07/04 09:27:18 ross Exp $
#
# Verify output of makeflist against contents of $DESTDIR.
1994-08-29 19:21:02 +04:00
[ "$DESTDIR" ] || {
1994-08-29 19:21:02 +04:00
echo DESTDIR must be set
exit 1
}
1994-08-29 19:21:02 +04:00
origin=.
tmpname=/tmp/_CHECK.$$
1997-10-28 16:35:23 +03:00
if [ "$1" = "-x11" ]; then
sh makeflist -x > $tmpname
origin=./usr/X11R6
elif [ "$1" = "-both" ]; then
sh makeflist -b > $tmpname
elif [ "$1" ]; then
echo Usage: checkflist [ -x11 -both ]
exit 1
1997-10-28 16:35:23 +03:00
else
sh makeflist > $tmpname
1997-10-28 16:35:23 +03:00
fi
( cd $DESTDIR ; find $origin \( -type d -o -type f -o -type l \) ) | sort | \
diff $tmpname -
/bin/rm -f $tmpname