-
Notifications
You must be signed in to change notification settings - Fork 21
/
check-manifest
executable file
·40 lines (34 loc) · 1.45 KB
/
check-manifest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
# file: check-manifest G. Moody 14 December 2001
# Last revised: 26 August 2014
# Verify tarball contents
PACKAGE=$1
sort -f <MANIFEST | grep . | grep -v ${PACKAGE} >../expected-MANIFEST
sed 's+/$++' <../${PACKAGE}-MANIFEST | sort -f | grep . | \
grep -v ${PACKAGE} >../sort.$$
mv ../sort.$$ ../${PACKAGE}-MANIFEST
if diff ../expected-MANIFEST ../${PACKAGE}-MANIFEST
then
rm -f ../expected-MANIFEST ../${PACKAGE}-MANIFEST
cat <<EOF
The contents of ${PACKAGE} match the MANIFEST -- no errors were detected.
EOF
else
cat <<EOF
Oops! The MANIFEST does not match the contents of ${PACKAGE}!
The 'diff' output above indicates which file(s) do not match.
There are four possible reasons for this problem:
1. A file belonging to the package is missing; find it!
Look in previous versions of the package for the missing file.
2. A file that does not belong to the package is present within this
directory or one of its subdirectories; remove it!
3. A new file in the package is not mentioned in the MANIFEST; in this
case, replace MANIFEST with ../${PACKAGE}-MANIFEST.
4. A file formerly belonging to the package has been removed; in this
case, replace MANIFEST with ../${PACKAGE}-MANIFEST.
Read the 'diff' output above to identify which reason(s) apply. Be careful
not to replace MANIFEST unless all errors related to reasons 1 and 2 have
been corrected. In any case, rerun 'make tarballs' after correcting the
problem(s).
EOF
fi