From f4189f51de6a481c92f181303a27e0c0ef64f2af Mon Sep 17 00:00:00 2001 From: mwolson_admin Date: Sun, 22 Jun 2008 01:08:05 -0400 Subject: [PATCH] hcoop-git-maint: New script to do periodic git maintenance. --- hcoop-git-maint | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 hcoop-git-maint diff --git a/hcoop-git-maint b/hcoop-git-maint new file mode 100755 index 0000000..327ff88 --- /dev/null +++ b/hcoop-git-maint @@ -0,0 +1,14 @@ +#!/bin/bash +# +# Git maintenance script, run by cron. + +# Update symlinks to user git repo locations. +find /afs/hcoop.net/user -mindepth 3 -maxdepth 3 -noleaf -exec \ + sh -c "test -e {}/.hcoop-git && \ + ln -s {}/.hcoop-git/ /var/cache/git/\$(basename {}) 2>/dev/null" \; + +# Update cache of front page. +cache=/var/local/lib/gitweb/indexcache.html +wget -q -O $cache.tmp 'http://git.hcoop.net/test?nocache=y' +chmod a+r $cache.tmp +mv $cache.tmp $cache -- 2.20.1