NetBSD/distrib/sets/checkflist

28 lines
577 B
Bash
Executable File

#! /bin/sh --
#
# $NetBSD: checkflist,v 1.9 1998/07/04 09:27:18 ross Exp $
#
# Verify output of makeflist against contents of $DESTDIR.
[ "$DESTDIR" ] || {
echo DESTDIR must be set
exit 1
}
origin=.
tmpname=/tmp/_CHECK.$$
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
else
sh makeflist > $tmpname
fi
( cd $DESTDIR ; find $origin \( -type d -o -type f -o -type l \) ) | sort | \
diff $tmpname -
/bin/rm -f $tmpname