From: mwolson_admin Date: Wed, 17 Sep 2008 04:20:12 +0000 (-0400) Subject: hcoop-git-maint: Only update page if new content is nonempty. X-Git-Url: https://git.hcoop.net/hcoop/scripts.git/commitdiff_plain/863f93ee88d0173e3da0e6380b541cc3c70f7033 hcoop-git-maint: Only update page if new content is nonempty. --- 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