#!/bin/sh
# BRC compliance checking.

# get step files for brc
# finish=no
# while ( [ X$finish != "Xyes" ] )
# do
#    xterm -geometry 75x35+150+300 -name "DES Transaction" -e ${IFE_HOME}/sys/bin/SCKTncl_stp
#    finish=`${IFE_HOME}/sys/bin/dialog -p "Are all DES transactions complete ?" -file "yes" -d "yes" -h1 "type yes or no" -h2 "type yes or no"`

# done

# first see if BRC is available, if so then run it else show an image

if test ! -f ${IFE_HOME}/sys/bin/BRC ; then
   xterm -g 75x30+150+250 -name "compliance checking" -e ${IFE_HOME}/sys/bin/compliance
schema=`${IFE_HOME}/sys/bin/dialog -p "Please give a compliance summary." -file " " -d "Design is compliant" -h1 "Give a brief statement on compliance" -h2 "A one line summary is required."`

echo "$schema"
echo "$schema" > /tmp/brc_summary

   exit 0
fi

# invoke brc

finish=no
while ( [ X$finish != "Xyes" ] )
do
#   xterm -geometry 75x30+150+250 -name "compliance checking" -e ${IFE_HOME}/sys/bin/SCKTtud_brc
   xterm -geometry 75x30+150+250 -name "compliance checking"
   finish=`${IFE_HOME}/sys/bin/dialog -p "Are you finished with compliance checking ?" -file "yes" -d "yes" -h1 "type yes or no" -h2 "type yes or no"`

done

# Ask user for summary of performance.
schema=`${IFE_HOME}/sys/bin/dialog -p "Please give a compliance summary." -file " " -d "Design is compliant" -h1 "Give a brief statement on compliance" -h2 "A one line summary is required."`

echo "$schema"
echo "$schema" > /tmp/thermal_summary

# get petri to shift token to the subsequent transition.
#echo "shift_next_transition"
echo "Compliance checking DTF has exited"

exit 0
