#!/bin/ksh

# Component: qc
#
# Description:
#  Control script of component qc
#
# Last Updated     : $Author$
# Update Date Time : $Date$
# RCS File Name    : $RCSfile$
# RCS Revision     : $Revision$
# Locked by        : $Locker$
# Symbolic name    : $Name$
# State            : $State$

#--- INIT ------------------------------
#needs $HOME
. $HOME/etc/ctrl.main.shi

[ -f $HOME/etc/setenv.sh ] && . $HOME/etc/setenv.sh

#--- FUNC ------------------------------
do_shell_()
{
	cat <<-EndOfInlineData
		QC_HOME=$HOME/component/qc
		QC_VAR=$VAR/qc

	EndOfInlineData

} #do_shell_()

do_start_()
{
	[ ! -d "$QC_VAR" ] && mkdir $QC_VAR
	[ ! -f "$QC_VAR/reporttag.cfg" ] && cp $QC_HOME/reporttag.cfg $QC_VAR/reporttag.cfg

} #do_start_()


#
# List files/tables to be backed up grouped by categories
#
# output lines should be in '<category> <type> <names>' format
#
do_listbackup_()
{
	cat <<-EOFLISTBACKUP
		config.system FILE ${QC_VAR#$HOME/}
	EOFLISTBACKUP
}
#--- MAIN ------------------------------

check_action_ $1
if [ 0 = $? ]; then
	do_$1_ $2

else
	echo "--- Component qc [ctrl $$]: Bad command: $1" >&2
	exit 1

fi
