diff --git a/rsync/runsync.sh b/rsync/runsync.sh index bbec835997e5abfe6d9bb7dd8d45ab77431ef3fe..952cab27843bcc6b21c794c00394d44f7e9fa356 100755 --- a/rsync/runsync.sh +++ b/rsync/runsync.sh @@ -98,14 +98,14 @@ EOF fi RET=$? -# Check if there are leftover tmp directories, which will probably have to be deleted manually +# Check if there are leftover tmp directories, which will have to be deleted. # For the ones that use quick-fedora-mirror, we kind of have to guess where the files go. if [[ "${TOOL}" == "quick-fedora-mirror" ]]; then BASE="/repo/${NOMAD_TASK_NAME#prod_rsync_}" else BASE="/repo" fi -[[ -d $BASE ]] && find $BASE -type d -name '.~tmp~' -exec echo 'Warning: tmp directory detected: {}' \; +[[ -d $BASE ]] && find $BASE -type d -name '.~tmp~' -exec rm -rfv {} \; if [[ $RET -ne 0 ]]; then cat << EOF | error | tee $OUTPUT