--- /dev/null
+#!/bin/bash
+set -e
+
+mode_subst () {
+ $fn >$bfn.new
+}
+
+mode_diff () {
+ diff -u $dot $bfn.new || test $? = 1
+}
+
+mode_install () {
+ mv -f $bfn.new $dot
+}
+
+mode=$1
+case "$mode" in
+subst|diff|install) ;;
+*) echo >&2 'bad mode'; exit 1;
+esac
+shift
+
+for fn in templates/*.in; do
+ bfn=${fn%.in}
+ dot=$HOME/.${bfn#*/}
+ mode_$mode
+done
--- /dev/null
+#!/bin/bash
+set -e
+. infra/template
+
+case "$(hostname -f)" in
+*.xensource.com)
+ email="ian.jackson@eu.citrix.com"
+ cache=git://git-cache.xs.citrite.net:9419
+ ;;
+*)
+ email=ijackson@chiark.greenend.org.uk
+ ;;
+esac
+
+cat <<END
+[user]
+ email="$email"
+[sendemail]
+ bcc = $email
+END
+
+if [ "$cache" ]; then
+ cat <<END
+[url "$cache/git://"]
+ insteadOf = git://
+[url "$cache/git://"]
+ insteadOf = $cache/git://
+[color]
+ diff = false
+ ui = false
+END
+fi