From ceb3507a8fca872770b3dcd7e5c5b36179ab95b0 Mon Sep 17 00:00:00 2001 From: Manoj Srivastava Date: Fri, 30 May 2008 12:42:47 -0700 Subject: Import dist_3.5-236.orig.tar.gz [dgit import orig dist_3.5-236.orig.tar.gz] --- mcon/U/Instruct.U | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 mcon/U/Instruct.U (limited to 'mcon/U/Instruct.U') diff --git a/mcon/U/Instruct.U b/mcon/U/Instruct.U new file mode 100644 index 0000000..3bc4de2 --- /dev/null +++ b/mcon/U/Instruct.U @@ -0,0 +1,116 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?RCS: $Log: Instruct.U,v $ +?RCS: Revision 3.0.1.3 1997/02/28 15:02:55 ram +?RCS: patch61: logname / whoami sequence rewritten to use case +?RCS: +?RCS: Revision 3.0.1.2 1995/02/15 14:11:34 ram +?RCS: patch51: author name now appears at the end of the paragraph (WED) +?RCS: +?RCS: Revision 3.0.1.1 1995/01/11 15:12:05 ram +?RCS: patch45: now documents the & escape to turn -d on at the read prompt +?RCS: +?RCS: Revision 3.0 1993/08/18 12:05:04 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?X: +?X: This unit spew out the directions that we want everyone to read. I try to +?X: keep the first "pagefull" much less than a page since they don't know it +?X: isn't going to go shooting off the top of the screen, and we don't want +?X: to panic them yet. +?X: +?MAKE:Instruct: Begin Myread Configdir contains +?MAKE: -pick wipe $@ %< +?T:user needman firsttime +: general instructions +needman=true +firsttime=true +user=`(logname) 2>/dev/null` +case "$user" in +'') user=`whoami 2>&1`;; +esac +if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then + firsttime=false + echo " " + rp='Would you like to see the instructions?' + dflt=n + . ./myread + case "$ans" in + [yY]*) ;; + *) needman=false;; + esac +fi +if $needman; then + cat < package should be installed. If you get +stuck on a question, you may use a ! shell escape to start a subshell or +execute a command. Many of the questions will have default answers in square +brackets; typing carriage return will give you the default. + +On some of the questions which ask for file or directory names you are allowed +to use the ~name construct to specify the login directory belonging to "name", +even if you don't have a shell which knows about that. Questions where this is +allowed will be marked "(~name ok)". + +EOH + rp='' + dflt='Type carriage return to continue' + . ./myread + cat <<'EOH' + +The prompter used in this script allows you to use shell variables and +backticks in your answers. You may use $1, $2, etc... to refer to the words +in the default answer, as if the default line was a set of arguments given to a +script shell. This means you may also use $* to repeat the whole default line, +so you do not have to re-type everything to add something to the default. + +Everytime there is a substitution, you will have to confirm. If there is an +error (e.g. an unmatched backtick), the default answer will remain unchanged +and you will be prompted again. + +If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all +the questions and use the computed defaults (or the previous answers if there +was already a config.sh file). Type 'Configure -h' for a list of options. +You may also start interactively and then answer '& -d' at any prompt to turn +on the non-interactive behaviour for the remainder of the execution. + +EOH + . ./myread + cat <) know how I blew it. + +This installation script affects things in two ways: + +1) it may do direct variable substitutions on some of the files included + in this kit. +2) it builds a config.h file for inclusion in C programs. You may edit + any of these files as the need arises after running this script. + +If you make a mistake on a question, there is no easy way to back up to it +currently. The easiest thing to do is to edit config.sh and rerun all the SH +files. Configure will offer to let you do this before it runs the SH files. + +EOH +?X: In case they played with the prompter... + dflt='Type carriage return to continue' + . ./myread + case "$firsttime" in + true) echo $user >>../.config/instruct;; + esac +fi + -- cgit v1.2.3