Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
input-files.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2script=${0##*/}
3
4# --------------------------------------------------------------------------------------------
5#
6# Auxiliary script to copy input files.
7#
8# --------------------------------------------------------------------------------------------
9
10if [ -z $JPP_DIR ]; then
11 echo "Variable JPP_DIR undefined."
12 exit
13fi
14
15source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
16
17set_variable DEBUG 2
18set_variable WORKDIR ${TMPDIR:-/tmp}
19
20if do_usage $*; then
21 usage "$script <detector identifier> <detector identifier>"\
22 "\nAuxiliary script to copy input files."
23fi
24
25if (( $# != 2 )); then
26 fatal "Wrong number of arguments."
27fi
28
29source JAcousticsToolkit.sh
30
31if [[ $1 != [1-9][0-9]* ]] || [[ $2 != [1-9][0-9]* ]]; then
32 JCookie.sh
33fi
34
35ID=($(getDetector -D $1 -O int)
36 $(getDetector -D $2 -O int))
37
38if (( $ID[1] == $ID[2] )); then
39 fatal "$1 and $2 are the same detector"
40fi
41
42RUNS=(1 99999999)
43VERSION=master
44
45for KEY in $ACOUSTICS_KEYS[*]; do
46
47 rm -f $WORKDIR/${KEY}.txt >& /dev/null
48
49 getFile.sh $JPP_DIR/inputs $ID[1] $RUNS[1] $KEY $VERSION $WORKDIR/${KEY}
50
51 if (( $? != 0 )); then
52 fatal "Abort."
53 fi
54
55 putFile.sh $WORKDIR/${KEY}.txt $JPP_DIR/inputs $ID[2] $RUNS[1] $RUNS[2] $KEY $VERSION
56done
57
58rm -f $WORKDIR/${^ACOUSTICS_KEYS}.txt >& /dev/null