Overview
Comment:# Print errors, if any.
mtt_error error.txt
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 3414ab4b1bc1103324aa58edc723b595237f4ae9bc7eac48c9a1de550b2baecc
User & Date: gawthrop@users.sourceforge.net on 1996-08-25 09:22:55
Other Links: branch diff | manifest | tags
Context
1996-08-25
09:31:49
More error handling. check-in: 166d2c8e7a user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:22:55
# Print errors, if any.
mtt_error error.txt
check-in: 3414ab4b1b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:20:32
General error handling. check-in: 6480812feb user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/abg2cbg_m from [1b1475635d] to [48eb148e55].

9
10
11
12
13
14
15



16
17
18
19
20
21
22
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25







+
+
+







# Acausal bond graph to causal bond graph: mfile format

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.6  1996/08/24 14:36:01  peter
## Error handling included.
##
## Revision 1.5  1996/08/19 15:38:31  peter
## Removed bug work round.
##
## Revision 1.4  1996/08/16 14:28:45  peter
## Some debugging lines removed.
##
## Revision 1.3  1996/08/08 18:06:55  peter
92
93
94
95
96
97
98
99

100
101
102
103
104
105
106
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


95
96
97
98
99
100
101

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117













118
119
120


121
122







-
+















-
-
-
-
-
-
-
-
-
-
-
-
-



-
-
+
+
rm -f mtt_info.txt


#Inform user
echo Creating $1_cbg.m

# Use matrix manipulation to accomplish the transformation
$MATRIX  >abg2cbg_m.log  2>mtt_error << EOF
$MATRIX  >abg2cbg_m.log  2>mtt_error.txt << EOF

  infofile= '$infofile';

  %Convert from acausal to causal bond graph in m-file form.
  system_name = '$1';

  % THIS IS A NASTY BUG WORKROUND FOR OCTAVE
  % abg2cbg('RC','RC' ,'', [], infofile);
  
  port_bonds = [];
  [cbonds,status] = abg2cbg(system_name, '', '', port_bonds,infofile);

EOF

cat mtt_info.txt

# Test for errors and print if any
err_length=$(wc -c <mtt_error)
if [ $err_length != "0" ]
then
  echo MTT has failed with the following errors '...'
  cat mtt_error
  exit 1
else
  exit 0
fi



cp $1_$1_cbg.m $1_cbg.m 



# Print errors, if any.
mtt_error error.txt


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]