Browse Source

use series-test instead of series if it exists

Bill Gianopoulos 8 months ago
parent
commit
fbf2c8de08
1 changed files with 15 additions and 7 deletions
  1. 15 7
      scripts/check_series.sh

+ 15 - 7
scripts/check_series.sh

@@ -7,13 +7,21 @@ else
   echo Checking $1 ...
   pushd $1 >/dev/null
 fi
-if [ ! -f series ]
+if [ -f series-test ]
 then
-  echo no series file found
+  SERIES=series-test
+  FILES=`cat series-test`
+else
+  SERIES=series
+  FILE=*
+fi
+if [ ! -f $SERIES ]
+then
+  echo no $SERIES file found
   popd >/dev/null
   exit 1
 fi
-for i in *
+for i in $FILES
 do
   if [ "$i" != "series" -a "$i" != "status" ]
   then
@@ -24,11 +32,11 @@ do
       ERRORS=`expr $ERRORS + 1`
     fi
     j=`echo $i | sed -e 's@\.@\\\.@g'`
-    COUNT=`grep ^$j$ series | wc | sed -e 's@^\s*@@g' -e 's@ .*$@@g'`
+    COUNT=`grep ^$j$ $SERIES | wc | sed -e 's@^\s*@@g' -e 's@ .*$@@g'`
     if [ "$COUNT" != "1" ]
     then
       ERRORS=`expr $ERRORS + 1`
-      echo $i appears $COUNT times in series
+      echo $i appears $COUNT times in $SERIES
     fi
 #    NUM=3
     NUM=`grep -n '^diff' $i | head -1 | sed -e 's@\:.*$@@'`
@@ -62,11 +70,11 @@ do
     fi
   fi
 done
-for i in `cat series`
+for i in `cat $SERIES`
 do
   if [ ! -f $i ]
   then
-    echo File $i in series does not exist.
+    echo File $i in $SERIES does not exist.
     ERRORS=`expr $ERRORS + 1`
     echo $i
   fi