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     DATABASE_DEBUG      2
 
   12 set_variable:  WORKDIR   DATABASE_WORKDIR    `pwd`
 
   15     usage "$script <detector identifier> <run>[-<run>] [source [parameter]]"
 
   19     4)  set_variable  PARAMETER      $4;&
 
   20     3)  set_variable  SOURCE         $3;&
 
   21     2)  set_variable  RUNS           $2;
 
   22         set_variable  DETID          $1;;
 
   23     *)  fatal "Invalid number of arguments."
 
   26 set_variable  DETID        `getDetector -D $DETID -O string`
 
   27 set_variable  FILENAME     $WORKDIR/${DETID}_${RUNS}${SOURCE+.}${SOURCE}.log
 
   34 if [[ -n "$SOURCE"    ]]; then; SELECTOR+="source_name=$SOURCE";       fi
 
   35 if [[ -n "$PARAMETER" ]]; then; SELECTOR+="parameter_name=$PARAMETER"; fi
 
   37 if [[ ! -f ${FILENAME}.gz ]]; then
 
   40         --load-cookies=$HOME/.km3netdb_cookie                                         \
 
   41         --secure-protocol=TLSv1_2                                                     \
 
   42         "https://km3netdbweb.in2p3.fr/streamds/datalogstrings.txt?${(j:&:)SELECTOR}"  \
 
   47     if (( $? == 0 )) && [[ `head ${FILENAME}` != "ERROR: "* ]]; then