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 dest = options.prefix + "/lib/mercurial-server" |
|
32 |
31 |
33 def installFiles(d, *sources): |
32 def installFiles(d, *sources): |
34 d = options.root + d |
33 d = options.root + d |
35 os.makedirs(d) |
34 os.makedirs(d) |
36 for f in sources: |
35 for f in sources: |
37 shutil.copy(f, d) |
36 shutil.copy(f, d) |
38 |
37 |
39 installFiles(dest, |
38 installFiles(options.prefix + '/lib/mercurial-server', |
40 'src/hg-ssh', |
39 'src/hg-ssh', |
41 'src/refresh-auth') |
40 'src/refresh-auth') |
42 installFiles(dest + '/mercurialserver', |
41 installFiles(options.prefix + '/lib/mercurial-server', |
|
42 'src/hg-ssh', |
|
43 'src/refresh-auth') |
|
44 installFiles(options.prefix + '/lib/mercurial-server/mercurialserver', |
43 'src/mercurialserver/__init__.py', |
45 'src/mercurialserver/__init__.py', |
44 'src/mercurialserver/paths.py', |
46 'src/mercurialserver/paths.py', |
45 'src/mercurialserver/changes.py', |
47 'src/mercurialserver/changes.py', |
46 'src/mercurialserver/access.py', |
48 'src/mercurialserver/access.py', |
47 'src/mercurialserver/servelog.py', |
49 'src/mercurialserver/servelog.py', |
48 'src/mercurialserver/refreshauth.py', |
50 'src/mercurialserver/refreshauth.py', |
49 'src/mercurialserver/ruleset.py') |
51 'src/mercurialserver/ruleset.py') |
50 installFiles(dest + '/init', |
52 installFiles(options.prefix + '/lib/mercurial-server/init', |
51 'src/init/hginit', |
53 'src/init/hginit', |
52 'src/init/hgadmin-hgrc') |
54 'src/init/hgadmin-hgrc') |
53 installFiles('/etc/mercurial-server', |
55 installFiles('/etc/mercurial-server', |
54 'src/init/conf/remote-hgrc', |
56 'src/init/conf/remote-hgrc', |
55 'src/init/conf/access.conf') |
57 'src/init/conf/access.conf') |