Fix dist after [103b41295a80682125ec9b2373dfc1ac346fe656]
[vlc/vlc-skelet.git] / modules / list.sh
blob459b5d977beae89794fb77448085188455e31148
1 #! /bin/sh
2 # Piggy list consistency checker
4 LANG=C
5 export LANG
7 TEMPFILE=/tmp/vlclist.tmp.$$
8 LISTFILE=LIST
11 rm -f $TEMPFILE
12 touch $TEMPFILE
14 echo "------------------------------------"
15 echo "Checking that all modules are listed"
16 echo "------------------------------------"
18 i=0
20 for modfile in `find . -name "Modules.am"`
22 for module in `awk '/^SOURCES_/{sub(/SOURCES_/,"",$1); print $1}' "$modfile"`\
23 `awk '/^lib.*_plugin_la_SOURCES/{sub(/lib/,""); sub(/_plugin_la_SOURCES/,"",$1); print $1}' "$modfile"`
25 echo $module >> $TEMPFILE
26 if ! grep -q " \* $module:" $LISTFILE
27 then
28 echo "$module exists in $modfile, but not listed"
29 i=1
31 done
32 done
34 if [ $i = 0 ]
35 then
36 echo "OK"
39 i=0
41 echo
42 echo "--------------------------------------"
43 echo "Checking that all listed modules exist"
44 echo "--------------------------------------"
46 for module in `awk -F'[ :]' '/ \* /{print $3}' $LISTFILE`
48 if ! grep -wq $module $TEMPFILE
49 then
50 i=1
51 echo "$module is listed but does not exist"
53 done
55 if [ $i = 0 ]
56 then
57 echo "OK"
60 echo
61 echo "-------------------------------"
62 echo "Checking for alphabetical order"
63 echo "-------------------------------"
65 grep " \* " $LISTFILE | LC_CTYPE=C sort -c && echo "OK"
68 echo ""
69 echo "`sort -u $TEMPFILE | wc -l` modules listed in Modules.am files"
71 rm -f $TEMPFILE