Simplify directory tree

This commit is contained in:
Ian Gulliver
2016-04-06 22:38:57 -07:00
parent eebd3906fd
commit 8eb18f1ccf
5 changed files with 52 additions and 45 deletions

View File

@@ -47,17 +47,20 @@ def main():
'--assume-yes',
'daemontools-run', 'git', 'python3-openssl')
ExecChroot(
'git',
'clone',
'https://github.com/robot-tools/iconograph.git')
os.makedirs(os.path.join(FLAGS.chroot_path, 'icon', 'config'), exist_ok=True)
if not os.path.exists(os.path.join(FLAGS.chroot_path, 'icon', 'iconograph')):
ExecChroot(
'git',
'clone',
'https://github.com/robot-tools/iconograph.git',
'icon/iconograph')
os.mkdir(os.path.join(FLAGS.chroot_path, 'iconograph', 'config'))
shutil.copyfile(
FLAGS.ca_cert,
os.path.join(FLAGS.chroot_path, 'iconograph', 'config', 'ca.cert.pem'))
os.path.join(FLAGS.chroot_path, 'icon', 'config', 'ca.image.cert.pem'))
path = os.path.join(FLAGS.chroot_path, 'iconograph', 'client', 'flags')
path = os.path.join(FLAGS.chroot_path, 'icon', 'config', 'fetcher.flags')
with open(path, 'w') as fh:
fh.write('--base-url=%(base_url)s --max-images=%(max_images)d\n' % {
'base_url': FLAGS.base_url,
@@ -65,8 +68,8 @@ def main():
})
os.symlink(
'/iconograph/client',
os.path.join(FLAGS.chroot_path, 'etc', 'service', 'iconograph'))
'/icon/iconograph/client',
os.path.join(FLAGS.chroot_path, 'etc', 'service', 'iconograph-client'))
if __name__ == '__main__':