src/init/hginit
changeset 168 f9bf8f84df7f
parent 165 3606d60b07e5
child 311 3cbde66305e4
equal deleted inserted replaced
167:aeeba4d0dd4e 168:f9bf8f84df7f
     1 #!/bin/sh
     1 #!/bin/sh
     2 
     2 
     3 # WARNING: this must be run from the hg user's home directory
     3 set -e
     4 
     4 
     5 set -e
     5 cd
       
     6 
       
     7 if [ -e .ssh/authorized_keys ] ; then
       
     8     echo "This user already exists with authorized keys, aborting"
       
     9     exit -1
       
    10 fi
     6 
    11 
     7 cp $1/init/dot-mercurial-server .mercurial-server
    12 cp $1/init/dot-mercurial-server .mercurial-server
     8 mkdir -p repos/hgadmin .ssh
    13 mkdir -p repos/hgadmin .ssh
     9 cd repos/hgadmin
    14 cd repos/hgadmin
    10 hg init .
    15 hg init .
    11 cp $1/init/hgadmin-hgrc .hg/hgrc
    16 cp $1/init/hgadmin-hgrc .hg/hgrc
       
    17