This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RE: [perl #26136] localtime(3) calls tzset(3), but localtime_r(3) may not.
[metaconfig.git] / U / modified / Instruct.U
1 ?RCS: $Id: Instruct.U,v 3.0.1.3 1997/02/28 15:02:55 ram Exp $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1993, 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 3.0.
10 ?RCS:
11 ?RCS: $Log: Instruct.U,v $
12 ?RCS: Revision 3.0.1.3  1997/02/28  15:02:55  ram
13 ?RCS: patch61: logname / whoami sequence rewritten to use case
14 ?RCS:
15 ?RCS: Revision 3.0.1.2  1995/02/15  14:11:34  ram
16 ?RCS: patch51: author name now appears at the end of the paragraph (WED)
17 ?RCS:
18 ?RCS: Revision 3.0.1.1  1995/01/11  15:12:05  ram
19 ?RCS: patch45: now documents the & escape to turn -d on at the read prompt
20 ?RCS:
21 ?RCS: Revision 3.0  1993/08/18  12:05:04  ram
22 ?RCS: Baseline for dist 3.0 netwide release.
23 ?RCS:
24 ?X: 
25 ?X: This unit spew out the directions that we want everyone to read.  I try to
26 ?X: keep the first "pagefull" much less than a page since they don't know it
27 ?X: isn't going to go shooting off the top of the screen, and we don't want
28 ?X: to panic them yet.
29 ?X: 
30 ?MAKE:Instruct: Myread Configdir Devel contains
31 ?MAKE:  -pick wipe $@ %<
32 ?T:user needman firsttime
33 : general instructions
34 needman=true
35 firsttime=true
36 user=`(logname) 2>/dev/null`
37 case "$user" in
38 '') user=`whoami 2>&1`;;
39 esac
40 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
41         firsttime=false
42         echo " "
43         rp='Would you like to see the instructions?'
44         dflt=n
45         . ./myread
46         case "$ans" in
47         [yY]*) ;;
48         *) needman=false;;
49         esac
50 fi
51 if $needman; then
52         cat <<EOH
53
54 This installation shell script will examine your system and ask you questions
55 to determine how the <PACKAGENAME> package should be installed. If you get
56 stuck on a question, you may use a ! shell escape to start a subshell or
57 execute a command.  Many of the questions will have default answers in square
58 brackets; typing carriage return will give you the default.
59
60 On some of the questions which ask for file or directory names you are allowed
61 to use the ~name construct to specify the login directory belonging to "name",
62 even if you don't have a shell which knows about that.  Questions where this is
63 allowed will be marked "(~name ok)".
64
65 EOH
66         rp=''
67         dflt='Type carriage return to continue'
68         . ./myread
69         cat <<'EOH'
70
71 The prompter used in this script allows you to use shell variables and
72 backticks in your answers.  You may use $1, $2, etc...  to refer to the words
73 in the default answer, as if the default line was a set of arguments given to a
74 script shell.  This means you may also use $* to repeat the whole default line,
75 so you do not have to re-type everything to add something to the default.
76
77 Everytime there is a substitution, you will have to confirm.  If there is an
78 error (e.g. an unmatched backtick), the default answer will remain unchanged
79 and you will be prompted again.
80
81 If you are in a hurry, you may run 'Configure -d'.  This will bypass nearly all
82 the questions and use the computed defaults (or the previous answers if there
83 was already a config.sh file). Type 'Configure -h' for a list of options.
84 You may also start interactively and then answer '& -d' at any prompt to turn
85 on the non-interactive behaviour for the remainder of the execution.
86
87 EOH
88         . ./myread
89         cat <<EOH
90
91 Much effort has been expended to ensure that this shell script will run on any
92 Unix system.  If despite that it blows up on yours, your best bet is to edit
93 Configure and run it again.  If you can't run Configure for some reason,
94 you'll have to generate a config.sh file by hand.  Whatever problems you
95 have, let me (<MAINTLOC>) know how I blew it.
96
97 This installation script affects things in two ways:
98
99 1) it may do direct variable substitutions on some of the files included
100    in this kit.
101 2) it builds a config.h file for inclusion in C programs.  You may edit
102    any of these files as the need arises after running this script.
103
104 If you make a mistake on a question, there is no easy way to back up to it
105 currently.  The easiest thing to do is to edit config.sh and rerun all the SH
106 files.  Configure will offer to let you do this before it runs the SH files.
107
108 EOH
109 ?X: In case they played with the prompter...
110         dflt='Type carriage return to continue'
111         . ./myread
112         case "$firsttime" in
113         true) echo $user >>../.config/instruct;;
114         esac
115 fi
116