File mttroot/mtt/bin/mtt_help artifact b86c2c832f part of check-in 2185143deb


#! /bin/sh

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

# Bourne shell script: mtt_help

# P.J.Gawthrop Nov 1996
# Copyright (c) P.J.Gawthrop 1996

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  1996/11/01 12:34:54  peterg
## Initial revision
##
###############################################################

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

if [ "$topic" = "comps" ]; then
  echo 'Components:'
  grep -h '\%SUMMARY' \
	$MTTPATH/comp/compound/*_lbl.txt  \
	$MTTPATH/comp/simple/*_cause.m \
	$MTTPATH/cr/r/*.cr|\
  sed 's/\%SUMMARY[ ]*/	/' |\
  grep $subtopic |\
  sed 's/:[ ]*/	/' |\
  sort

elif [ "$topic" = "reps" ]; then
  echo 'Representations:'
  grep  '#REPRESENTATION' $MTTPATH/mtt |\
  sed 's/#REPRESENTATION[	]*/	/' |\
  grep $subtopic |\
  sort

elif [ "$topic" = "crs" ]; then
  echo 'Constitutive relationships'
  grep -h '\%SUMMARY' \
	*.cr \
	$MTTPATH/cr/r/*.cr 2>/dev/null |\
  sed 's/\%SUMMARY[ ]*/	/' |\
  grep $subtopic |\
  sed 's/:[ ]*/	/' |\
  sort

else
  grep -h '\%SUMMARY' \
       $MTTPATH/comp/compound/$1_lbl.txt \
       $MTTPATH/comp/simple/$1_cause.m \
       $MTTPATH/cr/r/$1.cr \
       2>/dev/null |\
  sed 's/\%SUMMARY[ ]*//' |\
  sed 's/:[ ]*/	/'

  grep -h '\%DESCRIPTION' \
       $MTTPATH/comp/compound/$1_lbl.txt \
       $MTTPATH/comp/simple/$1_cause.m \
       $MTTPATH/cr/r/$1.cr \
	2>/dev/null |\
  sed 's/\%DESCRIPTION[	]*/	  /' |\
  sed 's/:[ ]*/	/'
fi;



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