First commit
[anna.git] / example / diameter / stackManagement / self_ruling_setups.sh
1 #!/bin/ksh
2 #@eramos
3 echo
4 echo "This script builds autonomous diameter stack ditionaries for current stack commands"
5 echo " setups which contain isolated operations but not a full set of avp dependences."
6 echo "To do this work, uses 'setups.bk/dependence.sh' and 'stackManagement' tool."
7 echo
8 echo "Press ENTER to continue, CTRL+C to abort ..."
9 read dummy
10
11 > result.xml
12 SETUPS_DIR=../../../source/diameter/stack/setups
13 BASE_PROTOCOL=$SETUPS_DIR/commands_baseProtocol.xml
14 for i in `ls $SETUPS_DIR/command*xml`
15 do
16    echo
17    DICTIONARY_NAME=`basename $i`
18    if test "$i" = "$BASE_PROTOCOL"; then continue; fi
19    echo "Processing '$DICTIONARY_NAME' ..."
20    $SETUPS_DIR/dependence.sh $i >/dev/null
21    LIST=`cat ${i}.dep`
22    rm ${i}.dep
23    /opt/bin/anna/example_diameter_stackManagement $LIST $BASE_PROTOCOL $i >/dev/null
24    mv result.xml Autonomous_${DICTIONARY_NAME}
25    echo "Generated 'Autonomous_${DICTIONARY_NAME}'"
26 done
27 echo
28