X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Flist.sh;h=459b5d977beae89794fb77448085188455e31148;hb=9427bb62cc89999ceee5e9fbd6a98c78db84ea8d;hp=ab7e53987d7c69622bf05c8b3d6aa64e56463437;hpb=ae13fdda72c140e318b6221f73223698cccbdcc1;p=vlc diff --git a/modules/list.sh b/modules/list.sh index ab7e53987d..459b5d977b 100755 --- a/modules/list.sh +++ b/modules/list.sh @@ -6,8 +6,6 @@ export LANG TEMPFILE=/tmp/vlclist.tmp.$$ LISTFILE=LIST -LISTFILE2=/tmp/vlclist2.tmp.$$ -LISTFILE3=/tmp/vlclist3.tmp.$$ rm -f $TEMPFILE @@ -21,7 +19,8 @@ i=0 for modfile in `find . -name "Modules.am"` do - for module in `awk '/^SOURCES_/{sub(/SOURCES_/,"",$1); print $1}' "$modfile"` + for module in `awk '/^SOURCES_/{sub(/SOURCES_/,"",$1); print $1}' "$modfile"`\ + `awk '/^lib.*_plugin_la_SOURCES/{sub(/lib/,""); sub(/_plugin_la_SOURCES/,"",$1); print $1}' "$modfile"` do echo $module >> $TEMPFILE if ! grep -q " \* $module:" $LISTFILE @@ -44,9 +43,9 @@ echo "--------------------------------------" echo "Checking that all listed modules exist" echo "--------------------------------------" -for module in `awk '/ \* /{gsub(/:/,"",$2); print $2}' $LISTFILE` +for module in `awk -F'[ :]' '/ \* /{print $3}' $LISTFILE` do - if ! grep -q $module $TEMPFILE + if ! grep -wq $module $TEMPFILE then i=1 echo "$module is listed but does not exist" @@ -63,27 +62,10 @@ echo "-------------------------------" echo "Checking for alphabetical order" echo "-------------------------------" -rm -f $LISTFILE2 -touch $LISTFILE2 -rm -f $LISTFILE3 -touch $LISTFILE3 - -grep " \* " $LISTFILE >> $LISTFILE2 - -sort -n $LISTFILE2 >> $LISTFILE3 - -i=`diff $LISTFILE2 $LISTFILE3|wc -l` -diff -u $LISTFILE2 $LISTFILE3 - -if [ $i = 0 ] -then - echo "OK" -fi +grep " \* " $LISTFILE | LC_CTYPE=C sort -c && echo "OK" echo "" -echo "`cat $TEMPFILE| wc -l` modules listed in Modules.am files" +echo "`sort -u $TEMPFILE | wc -l` modules listed in Modules.am files" rm -f $TEMPFILE -rm -f $LISTFILE2 -rm -f $LISTFILE3