12 BN_FILE=`basename $FILE`
13 TMP_FILE=/var/tmp/.${BN_FILE}.tmp
14 TMP2_FILE=/var/tmp/.${BN_FILE}.tmp2
16 grep "<avprule id=" $FILE > $TMP_FILE
21 AVP=$(echo $line | cut -d'"' -f2)
22 if test "$AVP" != "AVP"
24 grep -l " name=\"$AVP\"" ${DN_DEPENDENCE}/avps_* >> $TMP2_FILE
29 RESULT=`cat $TMP2_FILE | sort | uniq | grep -v "^${BN_FILE}$"`
30 if test "$RESULT" != ""
34 # To avoid infinite loop:
35 processed=`echo $ACCUMULATED | grep -w $i`
36 if test "$processed" = ""
38 ACCUMULATED="$ACCUMULATED $i"
39 echo $i >> $RESULT_FILE
51 [[ "$1" = "" ]] && quit "Use: $0 <dictionary>, i.e.: $0 commands_qosControl.xml, $0 avps_tme.xml, etc."
52 [[ ! -f "$1" ]] && quit "ERROR: file '$1' not found"
54 DN_DEPENDENCE=`dirname $0`
55 RESULT_FILE=/var/tmp/.${BN_FILE}.tmp3
60 echo "Finding dependences ..."
64 echo "Generated '${1}.dep' with needed dictionaries:"
66 cat $RESULT_FILE | sort | uniq > ${1}.dep
68 # Used for stackManagement: rm ${1}.dep
70 HAVE_COMMANDS=`grep "<command name=" $1`
71 if test "$HAVE_COMMANDS" != ""
73 echo "Your application must accumulate those resources to read '$1' and get it fully operative."
74 echo "Note that probably you will need to add some more commands dictionary as 'Base Protocol' one (don't forget it)."
78 rm .*.tmp .*.tmp2 .*.tmp3