4# --------------------------------------------------------------------------------------------
 
    6# Auxiliary script to copy input files.
 
    8# --------------------------------------------------------------------------------------------
 
   10if [ -z $JPP_DIR ]; then
 
   11    echo "Variable JPP_DIR undefined."
 
   15source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
 
   18set_variable  WORKDIR        ${TMPDIR:-/tmp}
 
   21    usage "$script <detector identifier> <detector identifier>"\
 
   22          "\nAuxiliary script to copy input files."
 
   26    fatal "Wrong number of arguments."
 
   29source JAcousticsToolkit.sh
 
   31if [[ $1 != [1-9][0-9]* ]] || [[ $2 != [1-9][0-9]* ]]; then
 
   35ID=($(getDetector -D $1 -O int)
 
   36    $(getDetector -D $2 -O int))
 
   38if (( $ID[1] == $ID[2] )); then
 
   39    fatal "$1 and $2 are the same detector"
 
   45for KEY in $ACOUSTICS_KEYS[*]; do
 
   47    rm -f $WORKDIR/${KEY}.txt >& /dev/null
 
   49    getFile.sh  $JPP_DIR/inputs  $ID[1]  $RUNS[1]  $KEY  $VERSION  $WORKDIR/${KEY}
 
   51    if (( $? != 0 )); then
 
   55    putFile.sh  $WORKDIR/${KEY}.txt  $JPP_DIR/inputs  $ID[2]  $RUNS[1]  $RUNS[2]  $KEY  $VERSION
 
   58rm -f $WORKDIR/${^ACOUSTICS_KEYS}.txt  >&  /dev/null