[asterisk-commits] trunk r25930 - /trunk/build_tools/prep_moduledeps

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue May 9 01:45:38 MST 2006


Author: markster
Date: Tue May  9 03:45:37 2006
New Revision: 25930

URL: http://svn.digium.com/view/asterisk?rev=25930&view=rev
Log:
Oops

Modified:
    trunk/build_tools/prep_moduledeps

Modified: trunk/build_tools/prep_moduledeps
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/prep_moduledeps?rev=25930&r1=25929&r2=25930&view=diff
==============================================================================
--- trunk/build_tools/prep_moduledeps (original)
+++ trunk/build_tools/prep_moduledeps Tue May  9 03:45:37 2006
@@ -1,4 +1,30 @@
 #!/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}
@@ -10,7 +36,9 @@
 	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



More information about the asterisk-commits mailing list