install
changeset 164 32131253c2f1
parent 96 975fb921c3f3
child 165 3606d60b07e5
equal deleted inserted replaced
163:8d73bcd75243 164:32131253c2f1
    26 
    26 
    27 if os.getgid() != 0:
    27 if os.getgid() != 0:
    28     print >>sys.stderr, "Install must be run as root user"
    28     print >>sys.stderr, "Install must be run as root user"
    29     sys.exit(-1)
    29     sys.exit(-1)
    30 
    30 
    31 
       
    32 def installFiles(d, *sources):
    31 def installFiles(d, *sources):
    33     d = options.root + d
    32     d = options.root + d
    34     os.makedirs(d)
    33     os.makedirs(d)
    35     for f in sources:
    34     for f in sources:
    36         shutil.copy(f, d)
    35         shutil.copy(f, d)
    49 installFiles(options.prefix + '/share/mercurial-server/init',
    48 installFiles(options.prefix + '/share/mercurial-server/init',
    50     'src/init/hginit',
    49     'src/init/hginit',
    51     'src/init/hgadmin-hgrc')
    50     'src/init/hgadmin-hgrc')
    52 installFiles(options.prefix + '/share/doc/mercurial-server',
    51 installFiles(options.prefix + '/share/doc/mercurial-server',
    53     'README',
    52     'README',
    54     'doc/configuring-access',
    53     'build/html/index.html')
    55     'doc/file-conditions',
       
    56     'doc/how-it-works',
       
    57     'doc/security')
       
    58 installFiles('/etc/mercurial-server',
    54 installFiles('/etc/mercurial-server',
    59     'src/init/conf/remote-hgrc',
    55     'src/init/conf/remote-hgrc',
    60     'src/init/conf/access.conf')
    56     'src/init/conf/access.conf')
    61 installFiles('/etc/mercurial-server/keys/root')
    57 installFiles('/etc/mercurial-server/keys/root')
    62 installFiles('/etc/mercurial-server/keys/users')
    58 installFiles('/etc/mercurial-server/keys/users')