@@ -1,17 +1,23 @@
#!/bin/bash
ERRORS=0
-pushd $1
+if [ "$1" = "" ]
+then
+ pushd . >/dev/null
+else
+ pushd $1 >/dev/null
+fi
if [ ! -f series ]
then
echo no series file found
- popd
+ popd >/dev/null
exit 1
fi
for i in *
do
if [ "$i" != "series" -a "$i" != "status" ]
- COUNT=`grep ^$i$ series | wc | sed -e 's@^\s*@@g' -e 's@ .*$@@g'`
+ j=`echo $i | sed -e 's@\.@\\\.@g'`
+ COUNT=`grep ^$j$ series | wc | sed -e 's@^\s*@@g' -e 's@ .*$@@g'`
if [ "$COUNT" != "1" ]
ERRORS=`expr $ERRORS + 1`
@@ -28,7 +34,7 @@ do
echo $i
done
-popd
+popd >/dev/null
if [ "$ERRORS" = "0" ]
echo no errors detected