From 863f93ee88d0173e3da0e6380b541cc3c70f7033 Mon Sep 17 00:00:00 2001 From: mwolson_admin Date: Wed, 17 Sep 2008 00:20:12 -0400 Subject: [PATCH] hcoop-git-maint: Only update page if new content is nonempty. --- hcoop-git-maint | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hcoop-git-maint b/hcoop-git-maint index d148f2a..05e3f37 100755 --- a/hcoop-git-maint +++ b/hcoop-git-maint @@ -10,5 +10,9 @@ find /afs/hcoop.net/user -mindepth 3 -maxdepth 3 -noleaf -exec \ # Update cache of front page. cache=/var/local/lib/gitweb/indexcache.html wget -q -O $cache.tmp 'http://git.hcoop.net/?nocache=y' -chmod a+r $cache.tmp -mv $cache.tmp $cache +if test -s $cache.tmp; then + chmod a+r $cache.tmp + mv $cache.tmp $cache +else + rm -f $cache.tmp +fi -- 2.20.1