Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
archive-get-Detector.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 WORKDIR ${TMPDIR:-/tmp}/
12set_variable: DEBUG ARCHIVE_DEBUG 2
13set_variable VERSION "*"
14
15if do_usage $*; then
16 usage "$script <archive> <detector identifier> <run> <type> <output file> [version]"\
17 "\nGet detector file from archive."
18fi
19
20case $# in
21 6) set_variable VERSION $argv[6];&
22 5) set_variable OUTPUT_FILE $argv[5];
23 set_variable TYPE $argv[4];
24 set_variable RUN $argv[3];
25 set_variable DETECTOR_ID $argv[2];
26 set_variable ARCHIVE $argv[1];;
27 *) fatal "Wrong number of arguments.";;
28esac
29
30
31set_variable DETECTOR `mktemp $WORKDIR/detectorXXXXXX`
32
33getFile.sh $ARCHIVE $DETECTOR_ID $RUN $TYPE $VERSION $DETECTOR
34
35CHECK_EXIT_CODE
36
37JConvertDetectorFormat -a $DETECTOR.* -o $OUTPUT_FILE --!
38
39CHECK_EXIT_CODE
40
41rm -f $DETECTOR $DETECTOR.* >& /dev/null