#!/bin/csh 
#
# Name: wfpc2_image_command
#
# Purpose: Runs the CDBS delivery process for a set of WFPC2 reference
#          file images.
#
# 06/01/2004 MSwam  changes for OPUS 15.2 (no more archiving done here)
#==========================================================================
# set constants
set science_ref_dir = "/data/cdbs8/uref/"
#
banner -- 
printf "You start your WFPC2 delivery process at:" 
date 
#
# Peform the CDBS part of the delivery (verification and db updates)
deliver_cdbs 
if ($status != 0) then
  printf "FAILURE of deliver_cdbs.\n\n"
  exit 1
endif
#
banner -- 
printf "...CDBS process done...Making links for delivery pick-up..."
cdbs_make_links
if ($status != 0) then
  printf "FAILURE of cdbs_make_links.\n\n"
  exit 1
endif
#
banner -- 
printf "...Copying GEIS and *fits files to $science_ref_dir ..." 
/bin/cp *b?? *r?? *fits  $science_ref_dir
if ($status != 0) then
  printf "FAILURE to copy to $science_ref_dir \n\n"
  exit 1
endif
banner -- 
printf "Process finished at:" 
date  
banner ....
