make this script work on solaris
[asterisk/asterisk.git] / build_tools / prep_moduledeps
index ca1ae9a..8454ef9 100755 (executable)
@@ -35,10 +35,10 @@ process_dir() {
        echo -e "\t<category name=\"MENUSELECT_${catsuffix}\" displayname=\"${displayname}\">"
        for file in ${dir}/${prefix}*.c
        do
-               fname=${file##${dir}/}
+               fname=`basename ${file} .c`
                get_description ${file}
                desc=${TDESC}
-               echo -e "\t\t<member name=\"${fname%%.c}\" displayname=\"${desc}\" remove_on_change=\"${dir}/${fname%%.c}.o ${dir}/${fname%%.c}.so\">"
+               echo -e "\t\t<member name=\"${fname}\" displayname=\"${desc}\" remove_on_change=\"${dir}/${fname}.o ${dir}/${fname}.so\">"
                awk -f build_tools/get_moduleinfo ${file}
                echo -e "\t\t</member>"
        done