3 if test -f config.sh; then TOP=.;
4 elif test -f ../config.sh; then TOP=..;
5 elif test -f ../../config.sh; then TOP=../..;
6 elif test -f ../../../config.sh; then TOP=../../..;
7 elif test -f ../../../../config.sh; then TOP=../../../..;
9 echo "Can't find config.sh."; exit 1
15 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
17 echo "Extracting pat/patbase (with variable substitutions)"
18 cat >patbase <<!GROK!THIS!
20 eval "exec perl -S \$0 \$*"
21 if \$running_under_some_shell;
23 # $Id: patbase.SH,v 3.0.1.3 1994/01/24 14:29:24 ram Exp $
25 # Copyright (c) 1991-1993, Raphael Manfredi
27 # You may redistribute only under the terms of the Artistic Licence,
28 # as specified in the README file that comes with the distribution.
29 # You may reuse parts of this distribution only within the terms of
30 # that same Artistic Licence; a copy of which may be found at the root
31 # of the source tree for dist 3.0.
33 # Original Author: Larry Wall <lwall@netlabs.com>
35 # $Log: patbase.SH,v $
36 # Revision 3.0.1.3 1994/01/24 14:29:24 ram
37 # patch16: added ~/.dist_profile awareness
39 # Revision 3.0.1.2 1993/08/24 12:15:58 ram
40 # patch3: random cleanup
42 # Revision 3.0.1.1 1993/08/19 06:42:32 ram
43 # patch1: leading config.sh searching was not aborting properly
45 # Revision 3.0 1993/08/18 12:10:38 ram
46 # Baseline for dist 3.0 netwide release.
49 \$version = '$VERSION';
50 \$patchlevel = '$PATCHLEVEL';
52 cat >>patbase <<'!NO!SUBS!'
54 $progname = &profile; # My name
57 &usage unless $#ARGV >= 0;
58 &usage unless &Getopts("ahV");
61 print STDERR "$progname $version PL$patchlevel\n";
69 $RCSEXT = ',v' unless $RCSEXT;
70 $TOPDIR = ''; # We are at the top-level directory
73 open(MANI,"MANIFEST.new") || die "No MANIFEST.new found.\n";
78 next if m|^patchlevel.h|; # Special file
86 foreach $file (@ARGV) {
87 $files = &rcsargs($file);
88 @files = split(' ',$files);
90 $rlog = `rlog -r$baserev -r$revbranch $files 2>&1`;
91 ($revs) = ($rlog =~ /selected revisions: (\d+)/);
93 print "$progname: $file has never been checked in--checking in...\n";
94 system 'perl', '-S', 'patcil', $file;
97 print "Last revision for $file is $baserev.\n";
98 system 'rcs', "-Nlastpat:$baserev", @files;
101 ($lastrev) = ($rlog =~ /revision $revbranch\.(\d+)/);
102 print "Last revision for $file is $revbranch.$lastrev.\n";
103 system 'rcs', "-Nlastpat:$revbranch.$lastrev", @files;
108 print STDERR "Usage: $progname [-ahV] [filelist]\n";
109 print STDERR " -a : all the files in MANIFEST.new\n";
110 print STDERR " -h : print this message and exit\n";
111 print STDERR " -V : print version number and exit\n";
116 $grep -v '^;#' ../pl/package.pl >>patbase
117 $grep -v '^;#' ../pl/rcsargs.pl >>patbase
118 $grep -v '^;#' ../pl/comment.pl >>patbase
119 $grep -v '^;#' ../pl/tilde.pl >>patbase
120 $grep -v '^;#' ../pl/profile.pl >>patbase