7 if [ -z $JPP_DIR ]; then
 
    8     echo "Variable JPP_DIR undefined."
 
   12 source $JPP_DIR/setenv.sh $JPP_DIR
 
   15     usage "$script (detector file|detector identifier)"\
 
   16           "\nAuxiliary script to locally install file with mechanical parameters for dynamical calibrations."
 
   19 if (( $# != 1 )); then
 
   20     fatal "Wrong number of arguments."
 
   23 set_variable  DETECTOR  $1
 
   25 if   [[ -f $DETECTOR ]]; then
 
   26     eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`                # detector identifier from file
 
   28     set_variable  DETECTOR_ID  `getDetector -D $DETECTOR -O int`    # detector identifier as number
 
   31 let  "RUN = 1"                                        # arbitrary run number
 
   32 set_variable  TYPE      mechanics                     # type
 
   33 set_variable  VERSION   \*                            # any version
 
   35 if [[ ! -f ${TYPE}_${(l:8::0::0:)DETECTOR_ID}.txt ]]; then
 
   36     getFile.sh  $JPP_ARCHIVE  $DETECTOR_ID  $RUN  $TYPE  $VERSION  ${TYPE}_${(l:8::0::0:)DETECTOR_ID}