[vlc-devel] commit: Simplify the other part, too. (JP Dinger )

git version control git at videolan.org
Fri Jul 31 18:28:11 CEST 2009


vlc | branch: master | JP Dinger <jpd at videolan.org> | Tue Jul 28 16:04:47 2009 +0200| [5e94dabf8666776fb8c7575a832ec60fa6487362] | committer: JP Dinger 

Simplify the other part, too.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5e94dabf8666776fb8c7575a832ec60fa6487362
---

 modules/list.sh |   23 ++---------------------
 1 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/modules/list.sh b/modules/list.sh
index ab7e539..33ba1dc 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
@@ -44,7 +42,7 @@ 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
  then
@@ -63,27 +61,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"
 
 rm -f $TEMPFILE
-rm -f $LISTFILE2
-rm -f $LISTFILE3




More information about the vlc-devel mailing list