#!/bin/csh -x
##########################################################################
#
# routine: bc_copytrx.csh 
#
# purpose: Script for ACS pre-calibration activities
#
# modification history:
#
#   date    opr     who     reason
# -------- -----  --------  --------------------------------------
# 10/18/02 46823  Rose      Just copy the trailer
# 11/04/02 46838  Rose      Rename long suffixes to the DADS 3-characters
# 03/24/03 48019  Rose      No. No.  Need to rename AFTER calibration
#
##########################################################################
set banner=">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo $banner
\date
#
set go_absent = 102          #causes XPOLL to error exit
set no_calibration = 2   #causes calibration to be skipped
set all_is_well = 0
#
# set dataset from triggering OSF
set expname = $OSF_DATASET 
#
#-------------------------------------------------------
# resolve stretch for UNIX
#-------------------------------------------------------
set caldir = `osfile_stretch_file $OUTPATH`
set sisdir = `osfile_stretch_file $INPATH` 
#
#-------------------------------------------------------
# move to working directory
#-------------------------------------------------------
if (! -e $caldir) then
   echo "ERROR: $caldir directory does not exist"
   echo $banner
   exit $go_absent
endif
cd $caldir
if ($status != 0) then
   echo "ERROR: Failed to set directory to $caldir"
   echo $banner
   exit $go_absent
endif
#
#-------------------------------------------------------
# copy the trailer file to .tra
#-------------------------------------------------------
\cp  $sisdir/$expname.trx $caldir/$expname.tra
#

exit $all_is_well
