382 |
#( cd $TEMPDIR ; tar -xzvf $trOutp > $STDOUT ) |
#( cd $TEMPDIR ; tar -xzvf $trOutp > $STDOUT ) |
383 |
# to remove small files "._mydir" that some MAC OS are adding |
# to remove small files "._mydir" that some MAC OS are adding |
384 |
# (for each file or dir) to a tar-file, use option "--exclude=": |
# (for each file or dir) to a tar-file, use option "--exclude=": |
385 |
( cd $TEMPDIR ; tar -xzvf $trOutp --exclude="._*" > $STDOUT ) |
( cd $TEMPDIR ; tar -xzvf $trOutp --exclude="._*" > $STDOUT 2> $ERRMSG ) |
386 |
RETVAL=$? |
RETVAL=$? |
387 |
|
#echo "--- content of file $STDOUT (STDOUT):" |
388 |
|
#cat $STDOUT |
389 |
|
#echo "--- content of file $ERRMSG (ERRMSG):" |
390 |
|
#cat $ERRMSG |
391 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
392 |
echo "parsing email error" > $ERRMSG |
echo "parsing email error" >> $ERRMSG |
393 |
echo " - Error: tar -xzvf $trOutp returns:" $RETVAL | tee -a $ERRMSG |
echo " - Error: tar -xzvf $trOutp returns:" $RETVAL | tee -a $ERRMSG |
394 |
( cd $INDIR ; ls -l $prcM ) | tee -a $ERRMSG |
( cd $INDIR ; ls -l $prcM ) | tee -a $ERRMSG |
395 |
ls -l $TEMPDIR/$trOutp | tee -a $ERRMSG |
ls -l $TEMPDIR/$trOutp | tee -a $ERRMSG |
400 |
( cd $INDIR ; mv -f $grpM ../fail2process ) |
( cd $INDIR ; mv -f $grpM ../fail2process ) |
401 |
continue |
continue |
402 |
fi |
fi |
403 |
|
test -f $ERRMSG && rm -f $ERRMSG |
404 |
|
#-- |
405 |
tdir=`cat $STDOUT | head -1 | sed -e 's|^./||g' | cut -d '/' -f 1` |
tdir=`cat $STDOUT | head -1 | sed -e 's|^./||g' | cut -d '/' -f 1` |
406 |
if test -d $TEMPDIR/$tdir ; then |
if test -d $TEMPDIR/$tdir ; then |
407 |
rm -f $STDOUT |
rm -f $STDOUT |