Jpp  master_rocky-43-ge265d140c
the software that should make you happy
archive-put-Detector.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 if [ -z $JPP_DIR ]; then
5  echo "Variable JPP_DIR undefined."
6  exit
7 fi
8 
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10 
11 set_variable WORKDIR ${TMPDIR:-/tmp}/
12 set_variable: DEBUG ARCHIVE_DEBUG 2
13 
14 if do_usage $*; then
15  usage "$script <archive> <version> <type> <detector file> <first run> <last run>"\
16  "\nPut detector file into archive."
17 fi
18 
19 if (( $# == 6 )); then
20  set_array RUNS $argv[5] $argv[6]
21  set_variable DETECTOR $argv[4]
22  set_variable TYPE $argv[3]
23  set_variable VERSION $argv[2]
24  set_variable ARCHIVE $argv[1]
25 else
26  fatal "Wrong number of arguments."
27 fi
28 
29 eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
30 
31 putFile.sh $DETECTOR $ARCHIVE $DETECTOR_ID $RUNS[1] $RUNS[2] $TYPE $VERSION