]> git.sesse.net Git - vlc/commitdiff
* modules/list.sh:
authorSam Hocevar <sam@videolan.org>
Sat, 20 Sep 2003 03:38:52 +0000 (03:38 +0000)
committerSam Hocevar <sam@videolan.org>
Sat, 20 Sep 2003 03:38:52 +0000 (03:38 +0000)
    + "==" is not valid shell test, use "=" instead.
    + Set LANG for consistency of sort output.
  (NB: this really belongs to the toolbox script).

modules/list.sh

index 0ac02fac90e1dd200fe4a5fc3b3dac1839e68dd5..39feab346b7b4f85a288c304f140142e4da546e4 100755 (executable)
@@ -1,6 +1,9 @@
 #! /bin/sh
 # Piggy list consistency checker
 
+LANG=C
+export LANG
+
 TEMPFILE=/tmp/list.tmp
 LISTFILE=LIST
 LISTFILE2=/tmp/list2.tmp
@@ -21,7 +24,7 @@ do
  for module in `grep "SOURCES_" $modfile|awk '{print $1}'|awk 'BEGIN {FS="SOURCES_"};{print $2}'`
  do
   echo $module >> $TEMPFILE
-  if [ `grep " \* $module:" $LISTFILE |wc -l` == 0 ]
+  if [ `grep " \* $module:" $LISTFILE |wc -l` = 0 ]
   then
    echo "$module exists in $modfile, but not listed"
    i=1
@@ -29,7 +32,7 @@ do
  done
 done
 
-if [ $i == 0 ]
+if [ $i = 0 ]
 then
   echo "OK"
 fi
@@ -43,14 +46,14 @@ echo "--------------------------------------"
 
 for module in `grep " \* " $LISTFILE|awk '{print $2}'|sed s,':',,g `
 do
- if [`grep $module $TEMPFILE|wc -l` == 0 ]
+ if [ `grep $module $TEMPFILE|wc -l` = 0 ]
  then
   i=1
   echo "$module is listed but does not exist"
  fi
 done
 
-if [ $i == 0 ]
+if [ $i = 0 ]
 then
   echo "OK"
 fi
@@ -70,9 +73,9 @@ grep " \* " $LISTFILE  >> $LISTFILE2
 sort -n $LISTFILE2 >> $LISTFILE3
 
 i=`diff $LISTFILE2 $LISTFILE3|wc -l`
-diff $LISTFILE2 $LISTFILE3
+diff -u $LISTFILE2 $LISTFILE3
 
-if [ $i == 0 ]
+if [ $i = 0 ]
 then 
   echo "OK"
 fi