playlist/item: utilize TAB_FIND in ItemIndex
[vlc.git] / modules / list.sh
blobd5c0e8e9d4e40b1af6ccf20af9b046a16df6c1f7
1 #! /bin/sh
2 # Piggy list consistency checker
4 LANG=C
5 export LANG
7 TEMPFILE=/tmp/vlclist.tmp.$$
8 LISTFILE=MODULES_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" -o -name "Makefile.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_COLLATE=C 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