accept directory in place of component name
authorTimo Savola <tsavola@movial.fi>
Sun, 6 Apr 2008 13:51:38 +0000 (16:51 +0300)
committerTimo Savola <tsavola@movial.fi>
Sun, 6 Apr 2008 13:51:38 +0000 (16:51 +0300)
matrix/matrix.py

index 11bc55c..c7b6ed5 100644 (file)
@@ -35,7 +35,12 @@ def main():
 
        all_targets = components.init()
 
-       for name in targets:
+       for i in xrange(len(targets)):
+               name = targets[i]
+               if name.startswith('src' + os.path.sep):
+                       name = name.split(os.path.sep)[1]
+                       targets[i] = name
+
                if name not in config.components:
                        raise Error('Component "%s" does not exist' % name)