Commit | Line | Data |
---|---|---|
459d3fb5 MBT |
1 | #!/bin/sh |
2 | # $Id: manicheck.SH 1 2006-08-24 12:32:52Z rmanfredi $ | |
3 | # | |
4 | # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi | |
5 | # | |
6 | # You may redistribute only under the terms of the Artistic Licence, | |
7 | # as specified in the README file that comes with the distribution. | |
8 | # You may reuse parts of this distribution only within the terms of | |
9 | # that same Artistic Licence; a copy of which may be found at the root | |
10 | # of the source tree for dist 4.0. | |
11 | # | |
12 | # Original Author: Harlan Stenn <harlan@mumps.pfcs.com> | |
13 | # | |
14 | # $Log: manicheck.SH,v $ | |
15 | # Revision 3.0.1.1 1993/08/19 06:41:51 ram | |
16 | # patch1: leading config.sh searching was not aborting properly | |
17 | # | |
18 | # Revision 3.0 1993/08/18 12:04:02 ram | |
19 | # Baseline for dist 3.0 netwide release. | |
20 | # | |
21 | ||
22 | find . ! -type d -print | sed -e ' | |
23 | s|^./|| | |
24 | /RCS\//d | |
25 | /UU\//d | |
26 | /core$/d | |
27 | /\.bak$/d | |
28 | /\.orig$/d | |
29 | ' | sort > check.present | |
30 | ||
31 | manifest='' | |
32 | if test -r MANIFEST.new; then | |
33 | manifest='MANIFEST.new' | |
34 | else | |
35 | if test -r MANIFEST; then | |
36 | manifest='MANIFEST' | |
37 | else | |
38 | echo "No MANIFEST.new or MANIFEST file--don't know what to look for." | |
39 | fi | |
40 | fi | |
41 | ||
42 | awk '{print $1}' $manifest | sort > check.expected | |
43 | ||
44 | comm -23 check.expected check.present > check.want | |
45 | comm -13 check.expected check.present > check.extra | |
46 | ||
47 | rm -f check.expected check.present | |
48 | ||
49 | if test -s check.want; then | |
50 | echo "Some files listed in $manifest are missing; see check.want." | |
51 | else | |
52 | rm check.want | |
53 | fi | |
54 | ||
55 | if test -s check.extra; then | |
56 | echo "Some files not listed in $manifest are present; see check.extra." | |
57 | else | |
58 | rm check.extra | |
59 | fi |