chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mirroring: Remove pointless empty .log files
[dgit.git]
/
infra
/
dgit-mirror-rsync
diff --git
a/infra/dgit-mirror-rsync
b/infra/dgit-mirror-rsync
index 47142ee296beecf4eb93c57e7cf92687dc11f01a..0d29ffb3e65621b3fec1f468bd0d64c5d90f3772 100755
(executable)
--- 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 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"
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"
rm "$queue/$package.lock"
else
cat >&3 "$queue/$package.err"