Index: mttroot/mtt/bin/trans/mtt_update ================================================================== --- mttroot/mtt/bin/trans/mtt_update +++ mttroot/mtt/bin/trans/mtt_update @@ -11,23 +11,33 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.2 2000/10/12 13:45:13 peterg +## Put in the no-file version +## ## Revision 1.1 2000/10/12 12:32:23 peterg ## Initial revision ## ## ############################################################### sys=$1 # System name rep=$2 # System representation +update=$3 # Update or not + +if [ -z "$2" ]; then + echo Usage mtt_update system representation [update] + exit +fi -textfile=$1_$2.txt -infofile=$1_sympar.txt -default='0.0' +ext=txt +textfile=$1_$2.$ext +infofile=$1_sympar.$ext +default='1.0' if [ -f "$textfile" ]; then # Inform User echo Checking $textfile else @@ -60,10 +70,25 @@ if (!(iname in text)) print iname >> "mtt_in_info" } }' default=$default mtt_text mtt_info +if [ -z "$update" ]; then + if [ -f "mtt_in_text" ]; then + in_text=`cat mtt_in_text` + echo "The following variables are defined in $textfile, but do not exist:" + echo $in_text + echo Use mtt $sys $rep $ext to update + fi + if [ -f "mtt_in_info" ]; then + in_info=`cat mtt_in_info` + echo "The following variables are defined in $infofile, but do not exist:" + echo $in_info + echo Use mtt $sys $rep $ext to update + fi + exit +fi answered='' if [ -f "mtt_in_text" ]; then in_text=`cat mtt_in_text` echo "The following variables are defined in $textfile, but do not exist:" echo $in_text