Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
archive-put-calibration.sh
Go to the documentation of this file.
1#!/usr/bin/env 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}/
13set_variable RANGE 1-99999999
14
15if do_usage $*; then
16 usage "$script <archive> <version> <directory> [<first run>-<last run>]"\
17 "\nAuxiliary script to store pre-calibration results in archive."\
18 "\nThe directory corresponds to the location of the pre-calibration results."
19fi
20
21case $# in
22 4) set_variable RANGE $argv[4];&
23 3) set_variable DIR $argv[3];
24 set_variable VERSION $argv[2];
25 set_variable ARCHIVE $argv[1];;
26 *) fatal "Wrong number of arguments."
27esac
28
29source JAcousticsToolkit.sh
30
31set_variable DETECTOR $DIR/$ACOUSTICS_DETECTOR
32
33if [[ ! -f $DETECTOR ]]; then
34 fatal "Missing detector file $DETECTOR"
35fi
36
37eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
38
39for KEY in $ACOUSTICS_AUXS[*]; do
40 if [[ -f $DIR/$KEY.txt ]]; then
41 putFile.sh $DIR/${KEY}.txt $ARCHIVE $DETECTOR_ID ${RANGE%%-*} ${RANGE##*-} $KEY $VERSION
42 else
43 fatal "Missing file $DIR/$KEY.txt"
44 fi
45done
46
47archive-put-Detector.sh $ARCHIVE $VERSION detector $DETECTOR ${RANGE%%-*} ${RANGE##*-}