chiark / gitweb /
Mirroring: In backlog processing, tolerate errors
[dgit.git] / infra / dgit-mirror-rsync
index 9afd39f1659c62de4114dd84dd9f6ae4a3fdcca7..0fcc5f1943a019a3f28c250f657fa25dc7d9ba28 100755 (executable)
@@ -105,13 +105,13 @@ lock-and-process () {
 }
 
 attempt () {
-       exec >"$queue/$package.err" 2>&1
+       exec 3>&2 >"$queue/$package.err" 2>&1
        if actually; then
-               rm "$queue/$package.a"
+               rm -f "$queue/$package.a"
                mv -f "$queue/$package.err" "$queue/$package.log"
                rm "$queue/$package.lock"
        else
-               cat >&2 "$queue/$package.err"
+               cat >&3 "$queue/$package.err"
                exit 127
        fi
 }
@@ -146,13 +146,13 @@ reinvoke-locked)
 
 backlog)
        for f in $queue/*.[na]; do
-               lock-and-process-baseof-f
+               (lock-and-process-baseof-f ||:)
        done
        ;;
 
 all)
        for f in [a-z0-9]*.git; do
-               lock-and-process-baseof-f
+               (lock-and-process-baseof-f)
        done
        ;;