#!/bin/csh
#------------------------------------------------------------------
# links_to_test
#
# This tool creates hard links from each file in a CDBS delivery to
# the delivery areas for ONLY the DSB test and DSB dev systems.
#
# This allows each system to pick up the reference file delivery
# at its own pace, while taking up only the disk space necessary
# for one copy of the files.
#
# Links are purposefully skipped for the OPS delivery area
# (this script is meant to be used while testing a delivery).
#
# Run the tool from the directory containing the FITS files for the
# CDBS delivery, and the catalog and sql files.
#
# 05/06/03  MSwam      first version
#--------------------------------------------------------------------
#
# define the pick-up areas
set ROOT_DIR     = /data/cdbs1/test
set DSB_TEST_DIR = ${ROOT_DIR}/dsb_test
set DSB_DEV_DIR  = ${ROOT_DIR}/dsb_dev

# create hard links for each FITS file and for the catalog and sql files
foreach i (*.fits opus*cat opus*sql)
  echo "linking $i"
  /bin/ln -n $i $DSB_TEST_DIR/$i
  /bin/ln -n $i $DSB_DEV_DIR/$i
end
