Skip to content

Instantly share code, notes, and snippets.

@checko
Created May 23, 2013 09:04
Show Gist options
  • Save checko/5633751 to your computer and use it in GitHub Desktop.
Save checko/5633751 to your computer and use it in GitHub Desktop.
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