1999-10-27 03:30:08 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Check that all the files in MANIFEST exist and that (if this is a
|
|
|
|
# CVS checkout) that all the CVS-managed files appear in the
|
|
|
|
# MANIFEST.
|
|
|
|
|
|
|
|
verbose=yes
|
|
|
|
MANIFEST=/tmp/H5_MANIFEST.$$
|
|
|
|
|
2000-06-08 04:41:49 +08:00
|
|
|
# clean up $MANIFEST file when exits
|
|
|
|
trap "rm -f $MANIFEST" 0
|
|
|
|
|
1999-10-27 03:30:08 +08:00
|
|
|
# Copy the manifest file to get a list of file names.
|
|
|
|
grep '^\.' MANIFEST | expand | cut -f1 -d' ' >$MANIFEST
|
|
|
|
|
2000-01-08 07:23:57 +08:00
|
|
|
test "$verbose" && echo " Checking MANIFEST..." 1>&2
|
1999-10-27 03:30:08 +08:00
|
|
|
test -f $MANIFEST || exit 1
|
|
|
|
for file in `cat $MANIFEST`; do
|
|
|
|
if [ ! -f $file ]; then
|
|
|
|
echo "- $file"
|
|
|
|
fail=yes
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
for cvs in `find . -type d -name CVS -print`; do
|
|
|
|
path=`echo $cvs |sed 's/\/CVS//'`
|
|
|
|
for file in `grep '^\/' $cvs/Entries |cut -d/ -f2`; do
|
2000-06-08 04:41:49 +08:00
|
|
|
if (grep $path/$file$ $MANIFEST >/dev/null); then
|
1999-10-27 03:30:08 +08:00
|
|
|
:
|
|
|
|
else
|
|
|
|
echo "+ $path/$file"
|
|
|
|
fail=yes
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "X$fail" = "Xyes" ]; then
|
|
|
|
cat 1>&2 <<EOF
|
|
|
|
The MANIFEST is out of date. Files marked with a minus sign (-) no
|
|
|
|
longer exist; files marked with a plus sign (+) are CVS-managed but do
|
|
|
|
not appear in the MANIFEST. Please remedy the situation and try again.
|
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2000-01-08 07:23:57 +08:00
|
|
|
test "$verbose" && echo " The MANIFEST is up to date." 1>&2
|
1999-10-27 03:30:08 +08:00
|
|
|
exit 0
|