|
@@ -1,17 +1,23 @@
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
ERRORS=0
|
|
ERRORS=0
|
|
-pushd $1
|
|
|
|
|
|
+if [ "$1" = "" ]
|
|
|
|
+then
|
|
|
|
+ pushd . >/dev/null
|
|
|
|
+else
|
|
|
|
+ pushd $1 >/dev/null
|
|
|
|
+fi
|
|
if [ ! -f series ]
|
|
if [ ! -f series ]
|
|
then
|
|
then
|
|
echo no series file found
|
|
echo no series file found
|
|
- popd
|
|
|
|
|
|
+ popd >/dev/null
|
|
exit 1
|
|
exit 1
|
|
fi
|
|
fi
|
|
for i in *
|
|
for i in *
|
|
do
|
|
do
|
|
if [ "$i" != "series" -a "$i" != "status" ]
|
|
if [ "$i" != "series" -a "$i" != "status" ]
|
|
then
|
|
then
|
|
- 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" ]
|
|
if [ "$COUNT" != "1" ]
|
|
then
|
|
then
|
|
ERRORS=`expr $ERRORS + 1`
|
|
ERRORS=`expr $ERRORS + 1`
|
|
@@ -28,7 +34,7 @@ do
|
|
echo $i
|
|
echo $i
|
|
fi
|
|
fi
|
|
done
|
|
done
|
|
-popd
|
|
|
|
|
|
+popd >/dev/null
|
|
if [ "$ERRORS" = "0" ]
|
|
if [ "$ERRORS" = "0" ]
|
|
then
|
|
then
|
|
echo no errors detected
|
|
echo no errors detected
|