equal
deleted
inserted
replaced
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 |