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.20 2003/08/13 15:49:39 gawthrop
## Don't sort the states when defaulting - leave in implied order
##
## Revision 1.19 2003/08/05 15:29:36 gawthrop
## Now handles ss.r files with implicit zero values
##
## Revision 1.18 2003/08/04 09:10:30 gawthrop
|
>
>
>
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# Copyright (C) 2000 by Peter J. Gawthrop
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.21 2003/08/14 10:33:46 gawthrop
## Ignore if and endif
##
## Revision 1.20 2003/08/13 15:49:39 gawthrop
## Don't sort the states when defaulting - leave in implied order
##
## Revision 1.19 2003/08/05 15:29:36 gawthrop
## Now handles ss.r files with implicit zero values
##
## Revision 1.18 2003/08/04 09:10:30 gawthrop
|
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
value=${default}
fi
}
## Remove if, end and endif from list
remove_if() {
file=$1
tmpfile="$1_tmp"
mv ${file} ${tmpfile}
grep -v 'if[ (]\|endif;' <${tmpfile} > ${file}
## Delete empty file
size=`ls -s ${file} | awk '{print $1}'`
if [ "${size}" = "0" ]; then
rm $file
fi
}
rm -f mtt_empty
touch mtt_empty
case $rep in
numpar)
|
>
|
|
|
|
|
|
|
>
|
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
|
value=${default}
fi
}
## Remove if, end and endif from list
remove_if() {
file=$1
if [ -f ${file} ]; then
tmpfile="$1_tmp"
mv ${file} ${tmpfile}
grep -v 'if[ (]\|endif;' <${tmpfile} > ${file}
## Delete empty file
size=`ls -s ${file} | awk '{print $1}'`
if [ "${size}" = "0" ]; then
rm $file
fi
fi
}
rm -f mtt_empty
touch mtt_empty
case $rep in
numpar)
|