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 `awk '/^SOURCES_/{sub(/SOURCES_/,"",$1); print $1}' "$modfile"`
26 echo $module >> $TEMPFILE
27 if ! grep -q " \* $module:" $LISTFILE
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 `awk '/ \* /{gsub(/:/,"",$2); print $2}' $LISTFILE`
49 if ! grep -q $module $TEMPFILE
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"