summaryrefslogtreecommitdiff
path: root/mcon/U/Whoa.U
diff options
context:
space:
mode:
Diffstat (limited to 'mcon/U/Whoa.U')
-rw-r--r--mcon/U/Whoa.U51
1 files changed, 51 insertions, 0 deletions
diff --git a/mcon/U/Whoa.U b/mcon/U/Whoa.U
new file mode 100644
index 0000000..abc0637
--- /dev/null
+++ b/mcon/U/Whoa.U
@@ -0,0 +1,51 @@
+?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: Whoa.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:21:21 ram
+?RCS: patch61: whoa script now starts with leading "startsh"
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:02:01 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:19 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a bit of shell code that must be dotted in in order
+?X: to warn the user in case a change into a variable is noticed.
+?X:
+?X: To use this unit, $was must hold the old value that has changed. Upon
+?X: exit, the two variables $td and $tu are set to the correct value for
+?X: respectively defining or undefining a variable. For instance, if $vas was
+?X: $undef, but now $var is $define, after calling . whoa, you should use
+?X: eval "$var=\$tu" to finally set $var to the correct value. See unit Inlibc.
+?X:
+?MAKE:Whoa: Myread startsh hint
+?MAKE: -pick add $@ %<
+?F:./whoa
+?T:var was
+?LINT:change td tu
+: set up the script used to warn in case of inconsistency
+cat <<EOS >whoa
+$startsh
+EOS
+cat <<'EOSC' >>whoa
+dflt=y
+echo " "
+echo "*** WHOA THERE!!! ***" >&4
+echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
+rp=" Keep the $hint value?"
+. ./myread
+case "$ans" in
+y) td=$was; tu=$was;;
+esac
+EOSC
+