Overview
Comment:To avoid clashes when creating for more thsan one top level file, adds
_lower attribute to lower lecel constitutive relationship files.
.constitutive relationship files only in top level _constitutive
relationship files.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: ab25e0d2123d55f6f0f63929415aea43397c9c633fb7d720e5b1e793f323c3c4
User & Date: gawthrop@users.sourceforge.net on 1998-04-14 17:46:28.000
Other Links: branch diff | manifest | tags
Context
1998-04-14
18:01:04
Now executes a Makefile (if it exists) check-in: 96fc5283b2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
17:46:28
To avoid clashes when creating for more thsan one top level file, adds
_lower attribute to lower lecel constitutive relationship files.
.constitutive relationship files only in top level _constitutive
relationship files.
check-in: ab25e0d212 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
17:08:50
Input only on SS check-in: 8222401b33 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes
︙︙
12
13
14
15
16
17
18



19
20
21
22
23
24
25
# Copyright (c) P.J.Gawthrop, 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.5  1998/03/09 13:36:00  peterg
## Cosmetic change
##
## Revision 1.4  1998/03/06 15:54:41  peterg
## Put message bcak in in simpler form
##
## Revision 1.3  1998/03/06 15:51:06  peterg







>
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (c) P.J.Gawthrop, 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.6  1998/04/14 13:54:15  peterg
## Uses the _sub.sh rep to recursively generate and include sub systems.
##
## Revision 1.5  1998/03/09 13:36:00  peterg
## Cosmetic change
##
## Revision 1.4  1998/03/06 15:54:41  peterg
## Put message bcak in in simpler form
##
## Revision 1.3  1998/03/06 15:51:06  peterg
︙︙
44
45
46
47
48
49
50





51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69


70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

86
87
88
89
90
91
# already).
#
# Revision 1.1  1997/04/09  09:08:12  peterg
# Initial revision
#
###############################################################






if [ -f "$1_cr.r" ]; then
    echo "Using    $1_cr.r"
else
    # Inform user
    echo "Creating $1_cr.r"

    echo "% Constitutive relation file for $1 ($1_cr.r)" > $1_cr.r
    echo "% Generated by MTT at `date`" >> $1_cr.r

echo  >> $1_cr.r

    # Recursively create subsystem CR files
    sh $1_sub.sh 'cr_txt2r ' ''

    # Include subsystem CR files
    sh $1_sub.sh 'echo ' '_cr.r' |\
    awk '{
      print "in \"" $1 "\";"
    }'  >> $1_cr.r



    # Copy .cr files
    awk '{
	 if (NF>0) {
         print "mtt -q -u crcopy " $1; 
         }
    }' $1_cr.txt  | sh

    # Include the .cr files
    awk '{
	 if (NF>0) {
         print "in \"" $1 ".cr\";"
         }
    }' $1_cr.txt  >> $1_cr.r

    echo 'END;' >> $1_cr.r


fi
# Now invoke the standard error handling.
#mtt_error mtt_error.txt









>
>
>
>
>
|
|


|

|
|

|

|
|
|

|


|
>
>













|

|
>






47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# already).
#
# Revision 1.1  1997/04/09  09:08:12  peterg
# Initial revision
#
###############################################################

# The level of the recursion null at top level; _lower at lower levels.
level=$2

crfile=$1_cr$level.r

if [ -f "$crfile" ]; then
    echo "Using    $crfile"
else
    # Inform user
    echo "Creating $crfile"

    echo "% Constitutive relation file for $1 ($crfile)" > $crfile
    echo "% Generated by MTT at `date`" >> $crfile

echo  >> $crfile

    # Recursively create subsystem CR files -- at lower level
    sh $1_sub.sh 'cr_txt2r ' ' _lower' 
    
    # Include subsystem CR files
    sh $1_sub.sh 'echo ' '_cr_lower.r' |\
    awk '{
      print "in \"" $1 "\";"
    }'  >> $crfile

if [ -z "$level" ]; then

    # Copy .cr files
    awk '{
	 if (NF>0) {
         print "mtt -q -u crcopy " $1; 
         }
    }' $1_cr.txt  | sh

    # Include the .cr files
    awk '{
	 if (NF>0) {
         print "in \"" $1 ".cr\";"
         }
    }' $1_cr.txt  >> $crfile

    echo 'END;' >> $crfile
fi

fi
# Now invoke the standard error handling.
#mtt_error mtt_error.txt



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