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
CommitLineData
959f3c4c
JH
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:
2f9be6d1 30?MAKE:Instruct: Myread Configdir Devel contains
959f3c4c
JH
31?MAKE: -pick wipe $@ %<
32?T:user needman firsttime
33: general instructions
34needman=true
35firsttime=true
36user=`(logname) 2>/dev/null`
37case "$user" in
38'') user=`whoami 2>&1`;;
39esac
40if $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
50fi
51if $needman; then
52 cat <<EOH
53
54This installation shell script will examine your system and ask you questions
55to determine how the <PACKAGENAME> package should be installed. If you get
56stuck on a question, you may use a ! shell escape to start a subshell or
57execute a command. Many of the questions will have default answers in square
58brackets; typing carriage return will give you the default.
59
60On some of the questions which ask for file or directory names you are allowed
61to use the ~name construct to specify the login directory belonging to "name",
62even if you don't have a shell which knows about that. Questions where this is
63allowed will be marked "(~name ok)".
64
65EOH
66 rp=''
67 dflt='Type carriage return to continue'
68 . ./myread
69 cat <<'EOH'
70
71The prompter used in this script allows you to use shell variables and
72backticks in your answers. You may use $1, $2, etc... to refer to the words
73in the default answer, as if the default line was a set of arguments given to a
74script shell. This means you may also use $* to repeat the whole default line,
75so you do not have to re-type everything to add something to the default.
76
77Everytime there is a substitution, you will have to confirm. If there is an
78error (e.g. an unmatched backtick), the default answer will remain unchanged
79and you will be prompted again.
80
81If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
82the questions and use the computed defaults (or the previous answers if there
83was already a config.sh file). Type 'Configure -h' for a list of options.
84You may also start interactively and then answer '& -d' at any prompt to turn
85on the non-interactive behaviour for the remainder of the execution.
86
87EOH
88 . ./myread
89 cat <<EOH
90
91Much effort has been expended to ensure that this shell script will run on any
92Unix system. If despite that it blows up on yours, your best bet is to edit
93Configure and run it again. If you can't run Configure for some reason,
94you'll have to generate a config.sh file by hand. Whatever problems you
95have, let me (<MAINTLOC>) know how I blew it.
96
97This installation script affects things in two ways:
98
991) it may do direct variable substitutions on some of the files included
100 in this kit.
1012) 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
104If you make a mistake on a question, there is no easy way to back up to it
105currently. The easiest thing to do is to edit config.sh and rerun all the SH
106files. Configure will offer to let you do this before it runs the SH files.
107
108EOH
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
115fi
116