Jpp master_rocky-44-g75b7c4f75
the software that should make you happy
Loading...
Searching...
No Matches
archive-put-calibration.sh
Go to the documentation of this file.
1#!/bin/zsh
2script=${0##*/}
3
4if [ -z $JPP_DIR ]; then
5 echo "Variable JPP_DIR undefined."
6 exit
7fi
8
9source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10
11set_variable: DEBUG ARCHIVE_DEBUG 2
12set_variable: WORKDIR ARCHIVE_WORKDIR ${TMPDIR:-/tmp}/
13
14if do_usage $*; then
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."
18fi
19
20if (( $# != 3 )); then
21 fatal "Wrong number of arguments."
22fi
23
24set_variable ARCHIVE $argv[1]
25set_variable VERSION $argv[2]
26set_variable DIR $argv[3]
27
28source JAcousticsToolkit.sh
29
30set_variable DETECTOR $DIR/$ACOUSTICS_DETECTOR
31
32if [[ ! -f $DETECTOR ]]; then
33 fatal "Missing detector file $DETECTOR"
34fi
35
36eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
37
38RUNS=(1 99999999)
39
40for 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
43 else
44 fatal "Missing file $DIR/$KEY.txt"
45 fi
46done
47
48archive-put-Detector.sh $ARCHIVE $VERSION detector $DETECTOR $RUNS[1] $RUNS[2]