summaryrefslogtreecommitdiff
path: root/infra
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-07-11 19:14:03 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-07-11 19:31:26 +0100
commitb7f362f25ab0d961df1e100af7d07165b5ecdfc3 (patch)
treec6840d4997657d4e852f65e8db641b5d8e2487c4 /infra
parent7184a61e0bf4b097711965eee629541f54ebf4ec (diff)
Mirroring: Remove pointless empty .log files
Diffstat (limited to 'infra')
-rwxr-xr-xinfra/dgit-mirror-rsync4
1 files changed, 4 insertions, 0 deletions
diff --git a/infra/dgit-mirror-rsync b/infra/dgit-mirror-rsync
index 47142ee..0d29ffb 100755
--- a/infra/dgit-mirror-rsync
+++ b/infra/dgit-mirror-rsync
@@ -108,7 +108,11 @@ attempt () {
exec 3>&2 >"$queue/$package.err" 2>&1
if actually; then
rm -f "$queue/$package.a"
+ exec 2>&3 2>&1
mv -f "$queue/$package.err" "$queue/$package.log"
+ if ! [ -s "$queue/$package.log" ]; then
+ rm "$queue/$package.log"
+ fi
rm "$queue/$package.lock"
else
cat >&3 "$queue/$package.err"