#!/bin/sh
# this provides the user with the runtime info on the Driver parms
# and the model output parms for the particular project you are about to run

get_yesno()
{
    ANS="X"
    while [ "$ANS" != "y" -a "$ANS" != "n" -a "$ANS" != "Y" -a "$ANS" != "N" ]
    do
		echo  " (y/n): "
        read ANS
    done
}

# provide the paths
ProjName=$1
export ProjName

ModelPath=$SMD_HOME/Projects/
export ModelPath

DriverPath=$SMD_HOME/SMDriver/
export DriverPath

#uses the RunTime criteria in the RunParms dir
echo ""
awk -f $DriverPath/../scripts/RunTime $ModelPath$ProjName/RunParms/Driver.parm
echo ""
echo These are the RunTime parms.  Do you want to edit the Driver.parm using vi?
get_yesno
if [ "$ANS" = "y" -o "$ANS" = "Y" ]
  then 
	vi $ModelPath$ProjName/RunParms/Driver.parm
fi

#uses the OutStep criteria in the RunParms dir
echo ""
echo "Variable Name                 Outstep, Animate, Scale, Points"
/usr/bin/awk -f $DriverPath/../scripts/OutStep $ModelPath$ProjName/RunParms/Model.outList
echo ""
echo These are the output data.  Do you want to edit the Model.outList using vi?
get_yesno
if [ "$ANS" = "y" -o "$ANS" = "Y" ]
  then 
	vi $ModelPath$ProjName/RunParms/Model.outList
fi
