Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.162 1998/07/16 16:14:27 peterg +## Now stops if a transformation forces error. +## ## Revision 1.161 1998/07/08 11:21:32 peterg ## Added -I switch ## ## Revision 1.160 1998/07/04 11:38:51 peterg ## Version 3.0-- (Seascale) @@ -670,10 +673,11 @@ fi if [ -z "$1" ]; then if [ -z "$print" ]; then echo 'Usage: mtt help -- mtt on-line help' + echo ' mtt find component -- find location of a compound component' echo ' mtt info -- info-based manual' echo ' mtt info topic' echo ' mtt hinfo -- hypertext manual' echo ' mtt manual -- dvi manual' echo ' mtt warranty' @@ -728,10 +732,19 @@ mtt_check_var "$DVIVIEW" DVIVIEW echo Invoking $DVIVIEW $DVIVIEW $MTTPATH/doc/mtt.dvi & exit fi + +if [ $1 = "find" ]&& [$3 = ""]; then + mtt_find $MTT_COMPONENTS $2 + find_status=$? + if [ $find_status = "1" ]; then + echo Component $2 not found - is MTT_COMPONENTS set correctly? + fi + exit $find_status +fi if [ "$1" = "warranty" ] && [$2 = ""]; then cat << EOF Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 Peter J. Gawthrop @@ -1064,11 +1077,11 @@ mtt -u -q $mtt_switches -S "$Directory" $1 $2 $3 $4 mtt_status=$? # Exit on failure - if [ "mtt_status" != "0" ]; then + if [ "$mtt_status" != "0" ]; then echo Exiting mtt with status $mtt_status exit 1 fi if [ "$3" != "view" ]; then @@ -1410,13 +1423,10 @@ echo Creating $1_rep.txt; ( \ echo "# Outline report file for system $1 ($1_rep.txt)"; \ cat $MTTPATH/trans/m/rcs_header.txt; \ echo "mtt $1 abg tex"; \ - echo "mtt $1 struc tex"; \ - echo "mtt $1 sympar tex"; \ - echo "mtt $1 dae tex"; \ )> $1_rep.txt endif #SUMMARY rbg raw bond graph (m) #Raw bond graph: fig file to mfile