More robust path handling.

This commit is contained in:
Robert Bruce Park 2013-11-13 09:12:50 -08:00
parent d425a05528
commit fe0bfde041

View file

@ -161,11 +161,11 @@ while [ "1" ]; do
elif [ $stamp -ge $KEEP_DAILIES_DATE ]; then
# Delete all but the most recent of each day.
[ ${date:8:2} -eq ${prev:8:2} ] && echo rm -rf $DEST_FOLDER/$date
[ ${date:8:2} -eq ${prev:8:2} ] && echo rm -rf -- "$DEST_FOLDER/$date"
else
# Delete all but the most recent of each month.
[ ${date:5:2} -eq ${prev:5:2} ] && echo rm -rf $DEST_FOLDER/$date
[ ${date:5:2} -eq ${prev:5:2} ] && echo rm -rf -- "$DEST_FOLDER/$date"
fi
prev=$date