aboutsummaryrefslogtreecommitdiffstats
path: root/build_tools
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-09 08:45:37 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-09 08:45:37 +0000
commit1777f139b0c35d50d6aae3d413a2bbf68cf82147 (patch)
tree1efc42906ba838b595cec324f3cab118f3e27305 /build_tools
parent46abbe97e48ca74be0b83e143f9ec91de3012cd2 (diff)
Oops
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25930 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/prep_moduledeps30
1 files changed, 29 insertions, 1 deletions
diff --git a/build_tools/prep_moduledeps b/build_tools/prep_moduledeps
index f7f3c703c..650e24dfd 100755
--- a/build_tools/prep_moduledeps
+++ b/build_tools/prep_moduledeps
@@ -1,5 +1,31 @@
#!/bin/sh
+get_description() {
+ x=${1}
+ TDESC=`cat $x | grep -e *tdesc | cut -f 2 -d '"'`
+ if [ "$TDESC" = "" ]; then
+ TDESC=`cat $x | grep -A 2 -e *description | grep -e '\"' | cut -f 2 -d '"'`
+ fi
+ if [ "$TDESC" = "" ]; then
+ TDESC=`cat $x | grep -e MODULE_DESCRIPTION | grep -v return | cut -f 2 -d '"'`
+ fi
+ if [ "$TDESC" = "" ]; then
+ TDESC=`cat $x | grep -e tdesc\\\[\\\] | cut -f 2 -d '"'`
+ fi
+ if [ "$TDESC" = "" ]; then
+ TDESC=`cat $x | grep -e desc\\\[\\\] | grep -v description | cut -f 2 -d '"'`
+ fi
+ if [ "$TDESC" = "" ]; then
+ TDESC=`cat $x | grep -e *desc | grep -v descrip | cut -f 2 -d '"'`
+ fi
+ if [ "$TDESC" = "" ]; then
+ TDESC=`cat $x | grep -e *dtext | grep static | cut -f 2 -d '"'`
+ fi
+ if [ "$TDESC" = "" ]; then
+ TDESC=`cat $x | grep -A 2 -e *synopsis | grep -e '\"' | cut -f 2 -d '"'`
+ fi
+}
+
process_dir() {
dir=${1}
prefix=${2}_
@@ -10,7 +36,9 @@ process_dir() {
for file in ${dir}/${prefix}*.c
do
fname=${file##${dir}/}
- echo -e "\t\t<member name=\"${fname%%.c}.so\">"
+ get_description ${file}
+ desc=${TDESC}
+ echo -e "\t\t<member name=\"${fname%%.c}.so\" displayname=\"${desc}\">"
awk -f build_tools/get_moduledeps ${file}
echo -e "\t\t</member>"
done