Overview
Comment:Now uses new mtt_help
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: cc231eb98328b7730ba6fcf800d269a9ade504c9f921eb159fdcc5f7796f0aac
User & Date: gawthrop@users.sourceforge.net on 1998-07-16 20:41:05.000
Other Links: branch diff | manifest | tags
Context
1998-07-17
07:50:33
Now handles library name
Returns a status
0 if exactly one result
1 if no results
2 if two or more results
3 if utterly confused
check-in: e4ee38f692 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1998-07-16
20:41:05
Now uses new mtt_help check-in: cc231eb983 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
20:40:24
Cleaned up algorithms check-in: 91414ade99 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes
︙︙
10
11
12
13
14
15
16



17
18
19
20
21
22
23
# Copyright (c) P.J.Gawthrop 1996

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



## Revision 1.9  1998/03/26 08:23:02  peterg
## Use mixed case Topic for *) part of case sttement
##
## Revision 1.8  1998/03/22 21:13:17  peterg
## Fixed bug in above
##
## Revision 1.7  1998/03/22 20:21:11  peterg







>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright (c) P.J.Gawthrop 1996

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.10  1998/05/18 08:35:19  peterg
## Surround arguments to tr with ""
##
## Revision 1.9  1998/03/26 08:23:02  peterg
## Use mixed case Topic for *) part of case sttement
##
## Revision 1.8  1998/03/22 21:13:17  peterg
## Fixed bug in above
##
## Revision 1.7  1998/03/22 20:21:11  peterg
︙︙
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
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
    echo '       mtt help <component_or_example_or_CR_name>'
  exit
fi

ext='_[cl]*.*[mt]'
summary='[%#]SUMMARY'
description='[%#]DESCRIPTION'


case $topic in
  components)
    key=$summary 
    find_path=$MTT_COMPONENTS
    name='*_*.*'
    sort='sort -u'
    blurb="Components";;

  crs) 
    key=$summary 
    find_path=$MTT_CRS
    name='*.cr'
    sort='sort -u'
    blurb="Constitutive Relationships";;

  examples) 
    key=$summary 
    find_path=$MTT_EXAMPLES
    name='*_lbl.txt'
    all='all'
    sort='sort -u'
    blurb="Examples";;

  representations)
    key=$summary 
    find_path=$MTTPATH/mtt
    name='mtt'
    all='all'
    sort='sort -u'
    blurb="Representations";;

  *)
    key="\"$summary|$description\"" 
    find_path=$MTT_LIB
    name=$Topic$ext
    all=''
    sort='cat'
    blurb=$Topic;;     

  
esac

subtopic=$2
if [ "$subtopic" = "" ]; then
  subtopic='.'
fi;

echo $blurb

  mtt_find $find_path "$name" "egrep -i $key.*$subtopic" $all|\


  sed "s/$summary[	]*/  /" |\
  sed "s/$description[	]*/  /" |\

  sed "s!$find_path/!!" |\
  $sort


















>





|













|













|

|
|


>









>
|
>
>
|

>




<
<
<
<
<
<
<
<
<
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
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









    echo '       mtt help <component_or_example_or_CR_name>'
  exit
fi

ext='_[cl]*.*[mt]'
summary='[%#]SUMMARY'
description='[%#]DESCRIPTION'
alias='[%#]ALIAS'

case $topic in
  components)
    key=$summary 
    find_path=$MTT_COMPONENTS
    name=''
    sort='sort -u'
    blurb="Components";;

  crs) 
    key=$summary 
    find_path=$MTT_CRS
    name='*.cr'
    sort='sort -u'
    blurb="Constitutive Relationships";;

  examples) 
    key=$summary 
    find_path=$MTT_EXAMPLES
    name=''
    all='all'
    sort='sort -u'
    blurb="Examples";;

  representations)
    key=$summary 
    find_path=$MTTPATH/mtt
    name='mtt'
    all='all'
    sort='sort -u'
    blurb="Representations";;

  *)
    key="$summary|$description|$alias" 
    find_path=$MTT_LIB
    name=$Topic
    all='all'
    sort='cat'
    blurb=$Topic;;     

  
esac

subtopic=$2
if [ "$subtopic" = "" ]; then
  subtopic='.'
fi;

echo $blurb

  mtt_find $find_path "$name" |\
  awk '{print "cat " $1 "/" $2}'   | sh  |\
  egrep $key |\
  sed "s/$summary[	]*//" |\
  sed "s/$description[	]*/  /" |\
  sed "s/$alias[	]*/  Alias: /" |\
  sed "s!$find_path/!!" |\
  $sort












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