path: root/mcon/U/Instruct.U
diff options
authorManoj Srivastava <>2008-05-30 12:42:47 -0700
committerManoj Srivastava <>2008-05-30 12:42:47 -0700
commitceb3507a8fca872770b3dcd7e5c5b36179ab95b0 (patch)
treeb46b4e25cfff5f4c13a330b8428ceed343e3796c /mcon/U/Instruct.U
Import dist_3.5-236.orig.tar.gz
[dgit import orig dist_3.5-236.orig.tar.gz]
Diffstat (limited to 'mcon/U/Instruct.U')
1 files changed, 116 insertions, 0 deletions
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: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?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: $Log: Instruct.U,v $
+?RCS: Revision 1997/02/28 15:02:55 ram
+?RCS: patch61: logname / whoami sequence rewritten to use case
+?RCS: Revision 1995/02/15 14:11:34 ram
+?RCS: patch51: author name now appears at the end of the paragraph (WED)
+?RCS: Revision 1995/01/11 15:12:05 ram
+?RCS: patch45: now documents the & escape to turn -d on at the read prompt
+?RCS: Revision 3.0 1993/08/18 12:05:04 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?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.
+?MAKE:Instruct: Begin Myread Configdir contains
+?MAKE: -pick wipe $@ %<
+?T:user needman firsttime
+: general instructions
+user=`(logname) 2>/dev/null`
+case "$user" in
+'') user=`whoami 2>&1`;;
+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
+if $needman; then
+ cat <<EOH
+This installation shell script will examine your system and ask you questions
+to determine how the <PACKAGENAME> 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)".
+ 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 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.
+ . ./myread
+ cat <<EOH
+Much effort has been expended to ensure that this shell script will run on any
+Unix system. If despite that it blows up on yours, your best bet is to edit
+Configure and run it again. If you can't run Configure for some reason,
+you'll have to generate a file by hand. Whatever problems you
+have, let me (<MAINTLOC>) 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 and rerun all the SH
+files. Configure will offer to let you do this before it runs the SH files.
+?X: In case they played with the prompter...
+ dflt='Type carriage return to continue'
+ . ./myread
+ case "$firsttime" in
+ true) echo $user >>../.config/instruct;;
+ esac