4 if [ -z $JPP_DIR ]; then
 
    5     echo "Variable JPP_DIR undefined."
 
    9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
 
   11 set_variable:  DEBUG           ARCHIVE_DEBUG          2
 
   12 set_variable:  WORKDIR         ARCHIVE_WORKDIR        ${TMPDIR:-/tmp}/
 
   15     usage "$script <archive> <version> <directory>"\
 
   16           "\nAuxiliary script to store pre-calibration results in archive."\
 
   17           "\nThe directory corresponds to the location of the pre-calibration results."
 
   20 if (( $# != 3 )); then
 
   21     fatal "Wrong number of arguments."
 
   24 set_variable  ARCHIVE         $argv[1]
 
   25 set_variable  VERSION         $argv[2]
 
   26 set_variable  DIR             $argv[3]
 
   28 source JAcousticsToolkit.sh
 
   30 set_variable  DETECTOR        $DIR/$ACOUSTICS_DETECTOR
 
   32 if [[ ! -f $DETECTOR ]]; then
 
   33     fatal "Missing detector file $DETECTOR"
 
   36 eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
 
   40 for KEY in $ACOUSTICS_AUXS[*]; do
 
   41     if [[ -f $DIR/$KEY.txt ]]; then
 
   42         putFile.sh  $DIR/${KEY}.txt  $ARCHIVE  $DETECTOR_ID  $RUNS[1]  $RUNS[2]  $KEY  $VERSION
 
   44         fatal "Missing file $DIR/$KEY.txt"
 
   48 archive-put-Detector.sh $ARCHIVE  $VERSION  detector  $DETECTOR  $RUNS[1]  $RUNS[2]