Move internal modules to icon_lib
This commit is contained in:
@@ -5,6 +5,8 @@ import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
import icon_lib
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(description='iconograph install module')
|
||||
parser.add_argument(
|
||||
@@ -29,27 +31,16 @@ parser.add_argument(
|
||||
FLAGS = parser.parse_args()
|
||||
|
||||
|
||||
def Exec(*args, **kwargs):
|
||||
print('+', args)
|
||||
subprocess.check_call(args, **kwargs)
|
||||
|
||||
|
||||
def ExecChroot(*args, **kwargs):
|
||||
Exec('chroot', FLAGS.chroot_path, *args, **kwargs)
|
||||
|
||||
|
||||
def main():
|
||||
ExecChroot(
|
||||
'apt-get',
|
||||
'install',
|
||||
'--assume-yes',
|
||||
module = icon_lib.IconModule(FLAGS.chroot_path)
|
||||
module.InstallPackages(
|
||||
'daemontools-run', 'genisoimage', 'git', 'python3-openssl',
|
||||
'python3-requests', 'python3-ws4py')
|
||||
|
||||
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(
|
||||
module.ExecChroot(
|
||||
'git',
|
||||
'clone',
|
||||
'https://github.com/robot-tools/iconograph.git',
|
||||
|
||||
Reference in New Issue
Block a user