#!/bin/sh # # Use this script to perform local end-of-run tasks. # Run number and SRT version come into this script as parameters # 1 and 2. If that doesn't work, they also come in on the JOBNUM # (run number) and JOBSRT (SRT version) environment variables. # Also, the variable $recostat contains the exit status of BearApp. # This script is sourced ('. local-reco-wrapup') from the job script. # echo "Sourcing local-reco-wrapup:" # # Free up unused staging space # if [ -z "$fseq" ] ; then fseq=`echo $JOBSRT | tr -d .| tr a-j 0-9 | tr k-t 0-9` fi #stageupdc -V$JOBNUM -q$fseq #stageqry -V$JOBNUM fvid=Y`echo $JOBNUM | cut -b2-6` stageupdc -V$fvid -q$fseq # # Copy over log from NFS # #if [ -d $logdir -a -h reco$JOBNUM.log ] ; then # if [ -s $logdir/reco$JOBNUM.log ] ; then # /bin/rm reco$JOBNUM.log # /bin/mv $logdir/reco$JOBNUM.log reco$JOBNUM.log # else # /bin/rm $logdir/reco$JOBNUM.log # [ -s reco$JOBNUM.log ] || /bin/rm reco$JOBNUM.log # fi # rmdir $logdir #fi # # QA scripts # if [ -x XXX$BFROOT/prod/mgr/qarun_prod -a ! -f core ] ; then $BFROOT/prod/mgr/qarun_prod -r $JOBSRT $JOBNUM 6.10.10a y n > qarun.log 2>&1 if [ $? -ne 0 ] ; then echo QA PROD SCRIPT FAILED /bin/mv qarun.log QA_FAIL.log else echo QA PROD SCRIPT SUCCEEDED /bin/rm qarun.log fi fi echo "End of local-reco-wrapup"