Blame view

runRequest 585 Bytes
ea763814   Elena.Budnik   init
1
2
3
#!/bin/bash
# Prepare & Run Request

47081b7a   Elena.Budnik   work
4
5
6
7
tgt_vi=$1
src_vi=$2
TaoStop=$3
SwStop=$4
ea763814   Elena.Budnik   init
8
9
10

. $(dirname $BASH_SOURCE)/env.sh

47081b7a   Elena.Budnik   work
11
12
13
 IFS='_' read -r -a array <<< "$tgt_vi"
 tgt=${array[0]}
 
ea763814   Elena.Budnik   init
14
 # delete results of previous calculations
f5a5ef6f   Elena.Budnik   work
15
 rm -rf $SW2NC/$tgt* $SW2DATA/$src/$tgt*
ea763814   Elena.Budnik   init
16
 
af920889   Elena.Budnik   ajust
17
 # delete previous requests 
f5a5ef6f   Elena.Budnik   work
18
 rm -f $REQ/*.xml 
ea763814   Elena.Budnik   init
19

47081b7a   Elena.Budnik   work
20
 cd $SW2ROOT/Bin.py; python makeRequest.py  $tgt_vi $src_vi $TaoStop $SwStop  > log
f5a5ef6f   Elena.Budnik   work
21
22
23
 DDLogin $DDUSER $DDPWD >> log
  
	
ea763814   Elena.Budnik   init
24
 # run newly created Request
47081b7a   Elena.Budnik   work
25
 # can be launched as stand alone executable
ea763814   Elena.Budnik   init
26
27
 for request in $REQ/$tgt*.xml
  do
47081b7a   Elena.Budnik   work
28
	python run.py $tgt $request  & echo $!
ea763814   Elena.Budnik   init
29
30
  done