runRequest
862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Prepare & Run Request
tgt_vi=$1
src_vi=$2
TaoStop=$3
SwStop=$4
. $(dirname $BASH_SOURCE)/env.sh
IFS='_' read -r -a array <<< "$tgt_vi"
tgt=${array[0]}
IFS='_' read -r -a array <<< "$src_vi"
src=${array[0]}
# delete results of previous calculations
rm -rf $SW2NC/$tgt* $SW2DATA/$src/$tgt*
# delete previous requests
rm -f $REQ/*.xml
cd $SW2ROOT/Bin.py; python makeRequest.py $tgt_vi $src_vi $TaoStop $SwStop > log
DDLogin $DDUSER $DDPWD >> log
# run newly created Request - ONLY FIRST ONE !
# can be launched as stand alone executable
for request in $REQ/$tgt*.xml
do
if [[ -f $request ]]
then
if [ $src = "omni" ]
then
python run.py $tgt $request $SwStop & echo $!
else
python run.py $tgt $request -1 & echo $!
fi
else
echo -100
fi
# run only first request !!!!
exit
done