Add more verbose logging

This commit is contained in:
Darko Poljak 2019-10-10 10:54:56 +02:00
parent 1628ce58c7
commit ca6d06c2c3

View file

@ -177,11 +177,12 @@ delete_from_file()
_techo "Removing $@ in ${trash}..." _techo "Removing $@ in ${trash}..."
empty_dir="empty-dir" empty_dir="empty-dir"
mkdir "${empty_dir}" || _exit_err "Empty directory ${empty_dir} cannot be created." mkdir "${empty_dir}" || _exit_err "Empty directory ${empty_dir} cannot be created."
[ "${VVERBOSE}" ] && echo "rsync -a --delete ${empty_dir} ${trash}" [ "${VVERBOSE}" ] && echo "Starting: rsync -a --delete ${empty_dir} ${trash}"
# rsync needs ending slash for directory content # rsync needs ending slash for directory content
rsync -a --delete "${empty_dir}/" "${trash}/" || _exit_err "Removing $@ failed." rsync -a --delete "${empty_dir}/" "${trash}/" || _exit_err "Removing $@ failed."
rmdir "${trash}" || _exit_err "Removing ${trash} directory failed" rmdir "${trash}" || _exit_err "Removing ${trash} directory failed"
rmdir "${empty_dir}" || _exit_err "Removing ${empty_dir} directory failed" rmdir "${empty_dir}" || _exit_err "Removing ${empty_dir} directory failed"
[ "${VVERBOSE}" ] && echo "Finished: rsync -a --delete ${empty_dir} ${trash}"
} }
display_version() display_version()