Overview
Comment:Initial revision
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: e415b2b0e90608c427399774d3b8501029d88fe7944aa61803c2f38bd31d6995
User & Date: gawthrop@users.sourceforge.net on 1997-03-18 13:55:01
Other Links: branch diff | manifest | tags
Context
1997-03-18
17:25:24
Now just generates names - formatting removed. check-in: ffc0f4d871 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:55:01
Initial revision check-in: e415b2b0e9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1997-03-17
13:45:42
Added more error info. check-in: a72ecada3c user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/abg2lbl_fig2txt version [6aac9b5394].

























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#! /bin/sh

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

# Bourne shell script: abg2lbl_fig2txt
#
# Acausal bond graph to causal bond graph: mfile format

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


# P.J.Gawthrop March 1997
# Copyright (c) P.J.Gawthrop, 1997

infofile='mtt_info.txt'
typefile="$1_type.sh"

# Remove the old log file
rm -f abg2lbl_fig2txt.log
rm -f $1_cbg.m
rm -f $typefile
rm -f $infofile


#Inform user
echo Creating $1_lbl.txt

	( \
	echo "%SUMMARY $1: <brief description here>"; \
	echo "%DESCRIPTION <Detailed description here>"; \
	echo "%% Label file for system $1 ($1_lbl.txt)"; \
	cat $MTTPATH/trans/m/rcs_header.txt; \
	echo "%% Each line should be of one of the following forms:"; \
	echo "%	a comment (ie starting with %)"; \
	echo "%	Component-name	CR_name	arg1,arg2,..argn"; \
	echo "%	blank"; \
	echo; \
        echo \
        )> $1_lbl.txt

awk '/:/ {print $NF}' $1_abg.fig | \
sed 's/\\001//' | \
sort | \
tee $1_raw_list | \
sort -u> $1_unique_raw_list

grep -v  '\[[0-9]*\]'  $1_raw_list | awk --field-separator ':' \
 '{if ($1 ~ "SS") \
	print "% Component type", $1, "\n\t" $2 "\t\texternal\texternal";
	else \
	print "% Component type", $1, "\n\t" $2 "\t\tlin\t\targ1,arg2" }' \
>>$1_lbl.txt


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