Commit c39205d3 authored by Darko Poljak's avatar Darko Poljak

Exclude destintion dir from listing for last dir

parent 2788de47
...@@ -753,8 +753,10 @@ while [ "${source_no}" -lt "${no_sources}" ]; do ...@@ -753,8 +753,10 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
# #
# Check for backup directory to clone from: Always clone from the latest one! # Check for backup directory to clone from: Always clone from the latest one!
# Exclude destination_dir from listing, it can be touched reused and renamed
# oldest existing destination directory.
# #
last_dir="$(ls -${TSORT}p1 | grep '/$' | head -n 1)" || \ last_dir="$(ls -${TSORT}p1 | grep '/$' | grep -v "${destination_dir}" | head -n 1)" || \
_exit_err "Failed to list contents of ${ddir}." _exit_err "Failed to list contents of ${ddir}."
# #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment