start to move towards things living where they should and new
break-in system. Big change.
#!/bin/sh
set -e
REPO=~hg/repos/hgadmin
sudo -u hg -H hg -q -R "$REPO" update null
sudo -u hg mkdir $REPO/keys
cp $1 $REPO/keys/root
cd $REPO
echo "init user=root" > hg-ssh-access.conf
sudo -u hg -H /usr/local/lib/hg-admin-tools/refresh-auth ~/.ssh/authorized_keys /etc/hg-admin-tools/hg-ssh-wrapper