2 # Piggy list consistency checker
7 TEMPFILE
=/tmp
/vlclist.tmp.$$
9 LISTFILE2
=/tmp
/vlclist2.tmp.$$
10 LISTFILE3
=/tmp
/vlclist3.tmp.$$
16 echo "------------------------------------"
17 echo "Checking that all modules are listed"
18 echo "------------------------------------"
22 for modfile
in `find . -name "Modules.am"`
24 for module
in `grep "SOURCES_" $modfile|awk '{print $1}'|awk 'BEGIN {FS="SOURCES_"};{print $2}'`
26 echo $module >> $TEMPFILE
27 if [ `grep " \* $module:" $LISTFILE |wc -l` = 0 ]
29 echo "$module exists in $modfile, but not listed"
43 echo "--------------------------------------"
44 echo "Checking that all listed modules exist"
45 echo "--------------------------------------"
47 for module
in `grep " \* " $LISTFILE|awk '{print $2}'|sed s,':',,g `
49 if [ `grep $module $TEMPFILE|wc -l` = 0 ]
52 echo "$module is listed but does not exist"
62 echo "-------------------------------"
63 echo "Checking for alphabetical order"
64 echo "-------------------------------"
71 grep " \* " $LISTFILE >> $LISTFILE2
73 sort -n $LISTFILE2 >> $LISTFILE3
75 i
=`diff $LISTFILE2 $LISTFILE3|wc -l`
76 diff -u $LISTFILE2 $LISTFILE3
85 echo "`cat $TEMPFILE| wc -l` modules listed in Modules.am files"