9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# Copyright (C) 2000 by Peter J. Gawthrop
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.5 2000/10/12 19:24:55 peterg
## Corrected output message
##
## Revision 1.4 2000/10/12 17:57:34 peterg
## Fixed header typos
##
## Revision 1.3 2000/10/12 15:11:30 peterg
|
>
>
>
>
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# Copyright (C) 2000 by Peter J. Gawthrop
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.6 2000/10/13 08:07:24 peterg
## Added state and input - it checks against sympar as well so that
## defined variables may be used here.
##
## Revision 1.5 2000/10/12 19:24:55 peterg
## Corrected output message
##
## Revision 1.4 2000/10/12 17:57:34 peterg
## Fixed header typos
##
## Revision 1.3 2000/10/12 15:11:30 peterg
|
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
if (!(iname in text)) print iname >> "mtt_in_info"
}
}' default=$default mtt_text mtt_info mtt_moreinfo
if [ -z "$update" ]; then
if [ -f "mtt_in_text" ]; then
in_text=`cat mtt_in_text`
echo "The following variables are defined in $textfile, but do not exist:"
echo $in_text
echo Use mtt $sys $rep $ext to update
fi
if [ -f "mtt_in_info" ]; then
in_info=`cat mtt_in_info`
echo "The following variables exist, but are not defined in $textfile:"
echo $in_info
echo Use mtt $sys $rep $ext to update
fi
exit
fi
answered=''
if [ -f "mtt_in_text" ]; then
in_text=`cat mtt_in_text`
echo "The following variables are defined in $textfile, but do not exist:"
echo $in_text
while [ -z "$answered" ]; do
echo "Update $textfile (y/n)?"
read answer < /dev/tty
case $answer in
y)
answered=yes
|
<
|
<
|
|
>
|
|
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
if (!(iname in text)) print iname >> "mtt_in_info"
}
}' default=$default mtt_text mtt_info mtt_moreinfo
if [ -z "$update" ]; then
if [ -f "mtt_in_text" ]; then
echo "The following variables are defined in $textfile, but do not exist:"
sort mtt_in_text | awk '{printf("\t%s\n",$1)}'
echo Use mtt $sys $rep $ext to update
fi
if [ -f "mtt_in_info" ]; then
echo "The following variables exist, but are not defined in $textfile:"
sort mtt_in_info | awk '{printf("\t%s\n",$1)}'
echo Use mtt $sys $rep $ext to update
fi
exit
fi
answered=''
if [ -f "mtt_in_text" ]; then
in_text=`sort mtt_in_text`
echo "The following variables are defined in $textfile, but do not exist:"
sort mtt_in_text | awk '{printf("\t%s\n",$1)}'
while [ -z "$answered" ]; do
echo "Update $textfile (y/n)?"
read answer < /dev/tty
case $answer in
y)
answered=yes
|
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
*)
esac
done
fi
answered=''
if [ -f "mtt_in_info" ]; then
in_info=`cat mtt_in_info`
echo "The following variables exist, but are not defined in $textfile:"
echo $in_info
while [ -z "$answered" ]; do
echo "Update $textfile (y/n)?"
read answer < /dev/tty
case $answer in
y)
answered=yes
|
|
|
|
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
*)
esac
done
fi
answered=''
if [ -f "mtt_in_info" ]; then
in_info=`sort mtt_in_info`
echo "The following variables exist, but are not defined in $textfile:"
sort mtt_in_info | awk '{printf("\t%s\n",$1)}'
while [ -z "$answered" ]; do
echo "Update $textfile (y/n)?"
read answer < /dev/tty
case $answer in
y)
answered=yes
|