Overview
Comment:Makes the sub.sh file directly from the abg.fig file
Used for making lbl files (abg2lbl_fig2txt)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 73cbdc1a7280eb1f94facb5de26751dded8d64f68bc989d5000e911a83536a5d
User & Date: gawthrop@users.sourceforge.net on 2001-06-11 19:47:49
Other Links: branch diff | manifest | tags
Context
2001-06-11
19:51:08
Zapped spurious $1 alias check-in: eab7beac7f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
19:47:49
Makes the sub.sh file directly from the abg.fig file
Used for making lbl files (abg2lbl_fig2txt)
check-in: 73cbdc1a72 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
19:46:17
New script for making simulation m file _sim.m check-in: f0fe3c35f3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/abg2sub_fig2sh version [98f9704915].



















































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: abg2sub_m2sh
  ###################################### 
  ##### Model Transformation Tools #####
  ######################################
  
  ###############################################################
  ## Version control history
  ###############################################################
  ## $Id$
  ## $Log$
  ##
  ###############################################################

# Copyright (C) 1996--2001 by Peter J. Gawthrop

if [ -f "$1_sub.sh" ]; then
    echo Using "$1_sub.sh"
    exit
else
    #Inform user
    echo Creating $1_sub.sh    
fi


echo '# Commands to generate subsystem representations'>  $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 _abg file
cat $1_abg.fig |\
grep ':' |\
awk '{if ($1==4) split($14,a,":"); print a[1]}'  |\
sort -u > mtt_tmp1

# Remove all components starting with 0 or 1
grep -v '^[01]' < mtt_tmp1 > mtt_tmp4

# Get a list of all standard simple components
ls $MTT_LIB/comp/simple |\
  awk '/_cause.m/{split($1,a,"_");print(a[1])}'  >mtt_tmp2

# Get a list of all standard compound components
#ls $MTTPATH/comp/compound |\
#  awk '/_abg.m/{split($1,a,"_");print(a[1])}'  >> mtt_tmp2

# Sorted combined list
cat mtt_tmp2 | \
  sed  's/^zero$/0/' |\
  sed  's/^one$/1/' |\
  sort -u >mtt_tmp3

# Print the non-standard components
comm mtt_tmp4 mtt_tmp3 |\
  awk 'BEGIN{FS="\t"}{if (length($1)>0) print "$1" $1 "$2"}' \
  >>$1_sub.sh

# Clean up mtt_tmp files
#rm -f mtt_tmp?









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