?RCS: $Id: Whoa.U 1 2006-08-24 12:32:52Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS: 
?RCS: You may redistribute only under the terms of the Artistic Licence,
?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 Licence; 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

