hginit
author Paul Crowley <paul@lshift.net>
Fri, 02 May 2008 18:03:42 +0100
changeset 30 98dbde5b13a1
parent 27 ec31ba248edd
child 31 d54720d47ca2
permissions -rwxr-xr-x
refresh-auth now takes ~/.ssh/authorized_keys as an argument, and it checks that it wrote it last time before rewriting it.

#!/bin/sh

set -e

initdir=$(pwd)

cd
mkdir -p admin repos/hgadmin/keys/admin .ssh
cp -r "$initdir" admin/hg-admin-tools
cp admin/hg-admin-tools/hg-ssh-wrapper admin/hg-admin-tools/remote-hgrc ~
mv admin/hg-admin-tools/first-adminkey repos/hgadmin/keys/admin/first
cd repos/hgadmin
hg init .
echo "init user=admin/*" > hg-ssh-access.conf
hg add
hg commit -m "initial commit"
cp ../../admin/hg-admin-tools/hgadmin-hgrc .hg/hgrc
../../admin/hg-admin-tools/refresh-auth ~/.ssh/authorized_keys ./hg-ssh-wrapper