#! /bin/bash

###
# Script to checkout QHACC_HOME from cvs before load,
# and check it back in after save
# 
# note: this script assumes the QHACC_HOME passed as
# the second argument is where the files will be
# checked out to. It also assumes you created the
# repository with the label "home" 
###

CVSROOT=/tmp/qhacccvs
CVSHOME=home

if [ x"$1" = "xload" ] ; then
  cvs -d $CVSROOT co -d $2 $CVSHOME
elif [ x"$1" = "xsave" ]; then
	cvs -d $CVSROOT commit -m "changes on $(date)" $2
fi