Index: mttroot/mtt/bin/trans/abg2cbg_m ================================================================== --- mttroot/mtt/bin/trans/abg2cbg_m +++ mttroot/mtt/bin/trans/abg2cbg_m @@ -11,10 +11,14 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.7 1996/08/25 09:22:55 peter +## # Print errors, if any. +## mtt_error error.txt +## ## Revision 1.6 1996/08/24 14:36:01 peter ## Error handling included. ## ## Revision 1.5 1996/08/19 15:38:31 peter ## Removed bug work round. @@ -114,9 +118,9 @@ EOF cat mtt_info.txt -cp $1_$1_cbg.m $1_cbg.m +cp $1_$1_cbg.m $1_cbg.m 2>> mtt_error.txt # Print errors, if any. -mtt_error error.txt +mtt_error mtt_error.txt Index: mttroot/mtt/bin/trans/cbg_m2fig ================================================================== --- mttroot/mtt/bin/trans/cbg_m2fig +++ mttroot/mtt/bin/trans/cbg_m2fig @@ -16,10 +16,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.3 1996/08/24 14:40:31 peter +## Error handling included. +## ## Revision 1.2 1996/08/08 18:07:31 peter ## Sorted out naming scheme for files ## ## Revision 1.1 1996/08/05 20:13:56 peter ## Initial revision @@ -31,40 +34,33 @@ rm -f cbg_m2fig.log rm -f mtt_info.txt # The following sets up the fig header file for the system # and each sub system. -ls $1_*_cbg.m | sed 's/\(.*_\)\(.*_\)cbg.m/cp \2fig.fig \1\2cbg.fig/' | sh +(ls $1_*_cbg.m \ +| sed 's/\(.*_\)\(.*_\)cbg.m/cp \2fig.fig \1\2cbg.fig/' \ +| sh ) 2>mtt_error.txt #Inform user echo Creating $1_cbg.fig # Use matrix manipulation to accomplish the transformation -$MATRIX > cbg_m2fig.log 2>mtt_error << EOF +$MATRIX > cbg_m2fig.log 2>>mtt_error.txt << EOF system_name = '$1'; thick = 3; length = 250; red = 4; blue = 1; green = 12; font = 18; cbg2fig(system_name, ... '', '', ... length, thick, blue, ... font, green, red); EOF -cp $1_$1_cbg.fig $1_cbg.fig - -# Test for errors and print if any -err_length=$(wc -c > mtt_error.txt + +# Print errors, if any. +mtt_error mtt_error.txt