Fix deletion and file permissions

This commit is contained in:
Frederick Ding 2015-07-31 03:33:26 -04:00
parent 80a2e92265
commit 90d1e798c9

View File

@ -37,15 +37,15 @@ do
rm $MAILDIR/extracted/$i/$i rm $MAILDIR/extracted/$i/$i
for z in $MAILDIR/extracted/$i/* for z in $MAILDIR/extracted/$i/*
do do
cp -v $z $DESTINATION/$MSGDATE/$MSGTIME/$(basename $z) cp -v --no-preserve=mode,ownership $z $DESTINATION/$MSGDATE/$MSGTIME/$(basename $z)
rm $z rm $z
done done
if [[ $DEBUG -eq 0 ]]; then
rm -fr $MAILDIR/extracted/$i/
fi
done done
shopt -u nullglob shopt -u nullglob
if [[ $DEBUG -eq 0 ]]; then
rm -fr $MAILDIR/extracted/$i/
fi
echo "[$(date '+%T')] Done!" echo "[$(date '+%T')] Done!"