Skip to content
Snippets Groups Projects
Commit 75f9ca3c authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

syncrepo: Properly clean up .~tmp~ dirs

We noticed that sometimes rsync becomes confused and leaves .~tmp~ dirs around which inhibits syncing from that point forward.
parent 9d6a7a95
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,9 @@ lastupdate_url='http://rsync.archlinux.org/lastupdate'
[ ! -d "${target}" ] && mkdir -p "${target}"
[ ! -d "${tmp}" ] && mkdir -p "${tmp}"
# Cleanup any temporary files from old run that might remain.
find "${target}" -name '.~tmp~' -exec rm -r {} +
exec 9>"${lock}"
flock -n 9 || exit
......
......@@ -59,6 +59,9 @@ lastupdate_url=''
[ ! -d "${target}" ] && mkdir -p "${target}"
[ ! -d "${tmp}" ] && mkdir -p "${tmp}"
# Cleanup any temporary files from old run that might remain.
find "${target}" -name '.~tmp~' -exec rm -r {} +
exec 9>"${lock}"
flock -n 9 || exit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment