#! /bin/sh

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

# Bourne shell script: lbl2sympar_txt2r

# Label file to symbolic parameters conversion
# P.J.Gawthrop August 1996
# Copyright (c) P.J.Gawthrop, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.6  1996/12/07  19:39:51  peterg
# Minor debugging.
#
## Revision 1.5  1996/09/12 17:18:44  peter
## Don't add an RCS header ..
##
## Revision 1.4  1996/08/30 19:01:21  peter
## Added headers to sympar file.
##
## Revision 1.3  1996/08/30 10:18:33  peter
## New path for awk script.
##
## Revision 1.2  1996/08/30 10:04:20  peter
## Included `;' in demimiter list.
##
# Revision 1.1  1996/08/24  13:34:09  peter
# Initial revision
#
###############################################################


# Inform user
echo "Creating $1_sympar.r"

rm -f mtt_error

#Write some file headers
echo "%% Symbolic parameter file ($1_sympar.r)" > $1_sympar.r
echo "%% Generated by MTT at `date`" >> $1_sympar.r

# This is the main transformation using awk
tr ';' ',' <  $1_lbl.txt | \
awk -f $MTTPATH/trans/awk/lbl2sympar.awk | sort >> $1_sympar.r 2>mtt_error.txt

# Now invoke the standard error handling.
mtt_error mtt_error.txt


