diff options
-rwxr-xr-x | tools/roomservice.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/roomservice.py b/tools/roomservice.py index 2d857b0..8276d76 100755 --- a/tools/roomservice.py +++ b/tools/roomservice.py @@ -63,6 +63,9 @@ while not depsonly: repositories.append(res) page = page + 1 +local_manifests = r'.repo/local_manifests' +if not os.path.exists(local_manifests): os.makedirs(local_manifests) + def exists_in_tree(lm, repository): for child in lm.getchildren(): if child.attrib['name'].endswith(repository): @@ -93,7 +96,7 @@ def get_default_revision(): def get_from_manifest(devicename): try: - lm = ElementTree.parse(".repo/local_manifest.xml") + lm = ElementTree.parse(".repo/local_manifests/roomservice.xml") lm = lm.getroot() except: lm = ElementTree.Element("manifest") @@ -117,7 +120,7 @@ def get_from_manifest(devicename): def is_in_manifest(projectname): try: - lm = ElementTree.parse(".repo/local_manifest.xml") + lm = ElementTree.parse(".repo/local_manifests/roomservice.xml") lm = lm.getroot() except: lm = ElementTree.Element("manifest") @@ -130,7 +133,7 @@ def is_in_manifest(projectname): def add_to_manifest(repositories, fallback_branch = None): try: - lm = ElementTree.parse(".repo/local_manifest.xml") + lm = ElementTree.parse(".repo/local_manifests/roomservice.xml") lm = lm.getroot() except: lm = ElementTree.Element("manifest") @@ -160,7 +163,7 @@ def add_to_manifest(repositories, fallback_branch = None): raw_xml = ElementTree.tostring(lm) raw_xml = '<?xml version="1.0" encoding="UTF-8"?>\n' + raw_xml - f = open('.repo/local_manifest.xml', 'w') + f = open('.repo/local_manifests/roomservice.xml', 'w') f.write(raw_xml) f.close() @@ -255,4 +258,4 @@ else: print "Done" sys.exit() -print "Repository for %s not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml." % device +print "Repository for %s not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml." % device |