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