#!/bin/csh

if ($#argv != 1) then
        echo "Usage: $0 dir1"
        echo "copies all files from one directory to another"
        goto done
endif

# Base directory to and from
setenv dir1 /grp/hst/cdbs/deliveries/etc/$1
setenv dircdbs /grp/hst/cdbs/

echo $dir1
echo $dircdbs

# All the directories
echo "copying all the CDBS Tree to $1"
#cp -Rf $dircdbs/grid/* $dir1/grid/.
#cp -Rf $dircdbs/calspec/* $dir1/calspec/.
#cp -Rf $dircdbs/calobs/* $dir1/calobs/.
#cp -Rf $dircdbs/extinction/* $dir1/extinction/.
#cp -Rf $dircdbs/etc/background/* $dir1/etc/background/.
#cp -Rf $dircdbs/etc/source/* $dir1/etc/source/.

echo "provide with the MJD for the new mjd.dat file " 
set mjd_val = $<
echo "You have selected  mjd_val"
if ($mjd_val == "") then
  echo "no tmc file give, leaving the file ipysyn_lookup.dat as is"
#cp $dircdbs/etc/mjd.dat  $dir1/etc/.

echo "provide with the name of the new TMC file " 
set tmc_file = $<
if ($tmc_file == "") then
  echo "no tmc file give, leaving the file ipysyn_lookup.dat as is"
#else
#  switch ($argv[1])
#    case [yY][eE][sS]:
#      echo "argv[1] is 'yes'"
#      breaksw
#    case [nN][oO]:
#      echo "argv[1] is 'no'"
#      breaksw
#    default:
#      echo "invalid arg: must be yes or no"
#      breaksw
#  endsw
endif
#cp $dircdbs/etc/pysyn_lookup.dat $dir1/etc/.
