hginit
changeset 31 d54720d47ca2
parent 30 98dbde5b13a1
child 32 4059dbe9f26a
equal deleted inserted replaced
30:98dbde5b13a1 31:d54720d47ca2
     1 #!/bin/sh
     1 #!/bin/sh
     2 
     2 
     3 set -e
     3 set -e
     4 
     4 
     5 initdir=$(pwd)
       
     6 
       
     7 cd
     5 cd
     8 mkdir -p admin repos/hgadmin/keys/admin .ssh
     6 mkdir -p repos/hgadmin .ssh
     9 cp -r "$initdir" admin/hg-admin-tools
       
    10 cp admin/hg-admin-tools/hg-ssh-wrapper admin/hg-admin-tools/remote-hgrc ~
       
    11 mv admin/hg-admin-tools/first-adminkey repos/hgadmin/keys/admin/first
       
    12 cd repos/hgadmin
     7 cd repos/hgadmin
    13 hg init .
     8 hg init .
    14 echo "init user=admin/*" > hg-ssh-access.conf
     9 cp /usr/local/lib/hg-admin-tools/hgadmin-hgrc .hg/hgrc
    15 hg add
    10 
    16 hg commit -m "initial commit"
       
    17 cp ../../admin/hg-admin-tools/hgadmin-hgrc .hg/hgrc
       
    18 ../../admin/hg-admin-tools/refresh-auth ~/.ssh/authorized_keys ./hg-ssh-wrapper