blob: abc0637244b2f96c537e71f4968313522983ba50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
|