Add "meta" command that fetches only the metadata (for dry-run testing)
authorKalle Vahlman <zuh@iki.fi>
Sun, 22 Jun 2008 18:37:23 +0000 (21:37 +0300)
committerKalle Vahlman <zuh@iki.fi>
Sun, 22 Jun 2008 18:37:33 +0000 (21:37 +0300)
matrix/matrix.py

index 955180a..5f122c9 100644 (file)
@@ -54,6 +54,7 @@ def main():
        command_funcs = {
                'install':      build,
                'install-only': build_only,
+               'meta':         meta,
                'clone':        clone,
                'clean':        clean,
                'rebase':       rebase,
@@ -72,6 +73,7 @@ def print_help(file, parser):
        parser.print_help(file=file)
        print >>file, '''
 commands:
+  meta          download the components' meta repositories
   clone         download the components' git repositories
   install       download, build and install the components
   install-only  download, build and install the specified components without
@@ -179,6 +181,12 @@ def execute(args):
 def remove_tree(path):
        execute(['rm', '-rf', path])
 
+def meta(targets):
+       for name in targets:
+               c = config.components[name]
+               if not c.meta.exists():
+                       c.meta.clone()
+       
 def clone(targets):
        for name in targets:
                c = config.components[name]