This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[UTIL] Perl system does not default to $_
[metaconfig.git] / dist / U / Chk_MANI.U
CommitLineData
d8875586
MBT
1?RCS: $Id: Chk_MANI.U 1 2006-08-24 12:32:52Z rmanfredi $
2?RCS:
3?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
4?RCS:
5?RCS: You may redistribute only under the terms of the Artistic Licence,
6?RCS: as specified in the README file that comes with the distribution.
7?RCS: You may reuse parts of this distribution only within the terms of
8?RCS: that same Artistic Licence; a copy of which may be found at the root
9?RCS: of the source tree for dist 4.0.
10?RCS:
11?RCS: $Log: Chk_MANI.U,v $
12?RCS: Revision 3.0.1.2 1997/02/28 14:57:25 ram
13?RCS: patch61: added support for src.U
14?RCS:
15?RCS: Revision 3.0.1.1 1994/10/31 09:33:14 ram
16?RCS: patch44: now lists Begin instead of Myinit in its dependencies
17?RCS: patch44: leading comment now explains how this unit is included
18?RCS:
19?RCS: Revision 3.0 1993/08/18 12:04:45 ram
20?RCS: Baseline for dist 3.0 netwide release.
21?RCS:
22?X:
23?X: This unit checks the package by making sure every file listed in MANIFEST
24?X: is present. It is systematically "included" via the Finish unit (which
25?X: is always present in every Configure script), although it may result in
26?X: an empty inclusion when no MANIFEST is present.
27?X:
28?MAKE:Chk_MANI: Begin c n rsrc
29?MAKE: -pick wipe $@ %<
30?T:filelist ans tmppwd
31?X: This check happens at metaconfig-time, so it's ok to hard-code the path.
32@if {test -f ../MANIFEST}
33: Now test for existence of everything in MANIFEST
34echo " "
35if test -f "$rsrc/MANIFEST"; then
36 echo "First let's make sure your kit is complete. Checking..." >&4
37?X:
38?X: Files spelled uppercased and beginning with PACK are produced by the
39?X: shell archive builder and may be removed by the user. Usually, they are
40?X: not listed in the MANIFEST file, but you never know...
41?X:
42?X: "split -l" is the new way of running a split, but we also try the older way
43?X:
44 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
45 (split -l 50 2>/dev/null || split -50)
46 rm -f missing
47 tmppwd=`pwd`
48 for filelist in x??; do
49 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \
50 >/dev/null 2>>"$tmppwd/missing")
51 done
52 if test -s missing; then
53 cat missing >&4
54 cat >&4 <<'EOM'
55
56THIS PACKAGE SEEMS TO BE INCOMPLETE.
57
58You have the option of continuing the configuration process, despite the
59distinct possibility that your kit is damaged, by typing 'y'es. If you
60do, don't blame me if something goes wrong. I advise you to type 'n'o
61and contact the author (<MAINTLOC>).
62
63EOM
64?X: Can't use $echo at this early stage
65 echo $n "Continue? [n] $c" >&4
66 read ans
67 case "$ans" in
68 y*)
69 echo "Continuing..." >&4
70 rm -f missing
71 ;;
72 *)
73?X:
74?X: Use kill and not exit, so that the trap gets executed to clean up
75?X:
76 echo "ABORTING..." >&4
77 kill $$
78 ;;
79 esac
80 else
81 echo "Looks good..."
82 fi
83else
84 echo "There is no MANIFEST file. I hope your kit is complete !"
85fi
86rm -f missing x??
87
88@end