1304dfd4179883065048da28bbafab2438fc46e4
[anna.git] / example / diameter / launcher / deployments / st-client / operation_all.sh
1 #!/bin/bash
2 # touch .operation_background to force background execution of every ADML instances operations "broadcasted"
3 cd `dirname $0`
4 if [ ! -d "ADMLS" ]
5 then
6   echo
7   echo "Run './configure.sh' first !"
8   echo
9   exit 1
10 fi
11
12 BGROUND=
13 [ -f .operation_background ] && BGROUND=yes
14
15 for op in `ls ADMLS/*/operation.sh`
16 do
17   dn_op=`dirname $op`
18   cd $dn_op
19   echo -n "Instance `basename $dn_op`: "
20   0>launcher.trace
21   if [ -n "$BGROUND" ]
22   then
23     ./operation.sh $@ &
24     sleep 0.01
25   else
26     ./operation.sh $@
27      [ $? -ne 0 ] && { echo ; exit 1 ; }
28   fi
29   cd - >/dev/null
30 done
31
32 echo
33 exit 0
34