Overview
Comment:Cleans up after itself.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 2be2a4fb7be3aa2dbb5f3cb84231bdf76042fdd12a2b861403477002c81872ca
User & Date: gawthrop@users.sourceforge.net on 1996-10-20 19:22:41
Other Links: branch diff | manifest | tags
Context
1996-10-20
19:23:54
Automatic generation of sub-system abg.m files. check-in: af3f3a57fb user: gawthrop@users.sourceforge.net tags: origin/master, trunk
19:22:41
Cleans up after itself. check-in: 2be2a4fb7b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
19:19:50
Initial revision check-in: 5ff20f5f4c user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/cmp2sub_m2sh from [09d87326f5] to [3e20629cfa].

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
# Copyright (c) P.J.Gawthrop 1996.

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



###############################################################


#Inform user
echo Creating $1_sub.sh

echo '# Commands to generate subsystems'>  $1_sub.sh
echo "# File $1_sub.sh"			>> $1_sub.sh
echo "# Generated by MTT on `date`."	>> $1_sub.sh
echo					>> $1_sub.sh

# Get a list of all components for the _cmp file
awk '/comp_type = / {print substr($3,2,length($3)-3)}' $1_cmp.m |\
sort -u > tmp1

# Get a list of all simple components
ls $MTTPATH/comp/simple |\
  awk '/_cause.m/{split($1,a,"_");print(a[1])}' |\
  sed  's/^zero$/0/' |\
  sed  's/^one$/1/' |\
  sort -u >tmp2

# Print the non-standard components
comm tmp1 tmp2 |\
  awk 'BEGIN{FS="\t"}{if (length($1)>0) print "mtt", $1, "abg m"}' \
  >>$1_sub.sh


















>
>
>













|






|


|


>
>
>
>







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
52
53
54
55
# Copyright (c) P.J.Gawthrop 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  1996/10/20 19:19:50  peterg
## Initial revision
##
###############################################################


#Inform user
echo Creating $1_sub.sh

echo '# Commands to generate subsystems'>  $1_sub.sh
echo "# File $1_sub.sh"			>> $1_sub.sh
echo "# Generated by MTT on `date`."	>> $1_sub.sh
echo					>> $1_sub.sh

# Get a list of all components for the _cmp file
awk '/comp_type = / {print substr($3,2,length($3)-3)}' $1_cmp.m |\
sort -u > mtt_tmp1

# Get a list of all simple components
ls $MTTPATH/comp/simple |\
  awk '/_cause.m/{split($1,a,"_");print(a[1])}' |\
  sed  's/^zero$/0/' |\
  sed  's/^one$/1/' |\
  sort -u >mtt_tmp2

# Print the non-standard components
comm mtt_tmp1 mtt_tmp2 |\
  awk 'BEGIN{FS="\t"}{if (length($1)>0) print "mtt", $1, "abg m"}' \
  >>$1_sub.sh

# Clean up mtt_tmp files
rm -f mtt_tmp1 mtt_tmp2









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