Created
May 23, 2013 09:04
-
-
Save checko/5633751 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import os | |
import xml.dom.minidom | |
sourcepath = "/home/charles-chang/imx53qsbandroid4.3/src/" | |
root = xml.dom.minidom.parse(os.path.join(sourcepath,'.repo/manifest.xml')) | |
projlist = [] | |
for node in root.childNodes[0].childNodes: | |
if node.nodeName == 'project': | |
pname = node.getAttribute('name') | |
ppath = node.getAttribute('path') | |
subprocess.call(['git','clone','--mirror',os.path.join(sourcepath,ppath),os.path.join('./',pname)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment