Fix deletion and file permissions
This commit is contained in:
parent
80a2e92265
commit
90d1e798c9
|
@ -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
|
||||||
done
|
|
||||||
|
|
||||||
shopt -u nullglob
|
|
||||||
|
|
||||||
if [[ $DEBUG -eq 0 ]]; then
|
if [[ $DEBUG -eq 0 ]]; then
|
||||||
rm -fr $MAILDIR/extracted/$i/
|
rm -fr $MAILDIR/extracted/$i/
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
shopt -u nullglob
|
||||||
|
|
||||||
echo "[$(date '+%T')] Done!"
|
echo "[$(date '+%T')] Done!"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user