--- /dev/null
+Three small bits:
+
+. new-git.sh - makes a bare repo on chiark, clones it, and pushes an
+ initial empty commit to it so that git push works as
+ expected.
+
+. post-update - a post-update hook that runs other post-update hooks
+
+. post-update-2chiark - a post-update hook that pushes to another repo
--- /dev/null
+#! /bin/sh
+set -e
+
+name="$1"
+shift
+
+ssh chiark "mkdir scm/$name; cd scm/$name; git init --bare"
+
+git clone "chiark:scm/$name"
+
+cd "$name"
+
+git commit --allow-empty -m Initial
+
+git push origin master
--- /dev/null
+#!/bin/bash
+
+# Runs all executable pre-commit-* hooks and exits after,
+# if any of them was not successful.
+#
+# Based on
+# http://osdir.com/ml/git/2009-01/msg00308.html
+#
+# Modified by JDA to log to syslog
+
+data=$(cat)
+exitcodes=()
+hookname=`basename $0`
+
+# Run each hook, passing through STDIN and storing the exit code.
+# We don't want to bail at the first failure, as the user might
+# then bypass the hooks without knowing about additional issues.
+
+for hook in $GIT_DIR/hooks/$hookname-*; do
+ test -x "$hook" || continue
+ echo "$data" | "$hook" 2>&1 | logger -p local5.notice -t ArtibusWiki
+ exitcodes+=($?)
+done
+
+# If any exit code isn't 0, bail.
+
+for i in "${exitcodes[@]}"; do
+ [ "$i" == 0 ] || exit $i
+done