windows下轻易下载android源码
2010-07-02 14:48:00 来源:WEB开发网首先得下载一个GIT在windows可以用PortableGit。有了git只能手动的输入要下载android源码的某部分,不过可以从以下地址http://android.git.kernel.org/?a=project_index 得到所有可以下载的源码。由于这个列表并不能直接用在PortableGit命令中所以我写了一个VBS脚本来转换
Html代码
szFolder ="K:HemowolfSRC_Android"'存放android源码目录
Set Fso = CreateObject("Scripting.FileSystemObject")
Set inFile =Fso.OpenTextFile("1.txt")'get TXT 文件
Set outFile =Fso.CreateTextFile("android.sh")'输出文件用于执行的
Do While Not ( inFile.AtEndOfLine Or inFile.AtEndOfStream)
szLine =inFile.ReadLine()
If (szLine <>"") Then
szLine = Trim(Replace(szLine,"Android+Open+Source+Project",""))
Item = Split(szLine, "/")
szPath =szFolder
For i = 0 To UBound(Item)
szPathszPath = szPath & "\" & Item(i)
If Not Fso.FolderExists(szPath) Then Call Fso.CreateFolder(szPath)
Next
outFile.WriteLine "git clone git://android.git.kernel.org/" & szLine & " " & Replace(szPath,"\","/")
End if
Loop
inFile.Close
outFile.Close
MsgBox "ok"
szFolder ="K:HemowolfSRC_Android"'存放android源码目录
Set Fso = CreateObject("Scripting.FileSystemObject")
Set inFile =Fso.OpenTextFile("1.txt")'get TXT 文件
Set outFile =Fso.CreateTextFile("android.sh")'输出文件用于执行的
Do While Not ( inFile.AtEndOfLine Or inFile.AtEndOfStream)
szLine =inFile.ReadLine()
If (szLine <>"") Then
szLine = Trim(Replace(szLine,"Android+Open+Source+Project",""))
Item = Split(szLine, "/")
szPath =szFolder
For i = 0 To UBound(Item)
szPath = szPath & "\" & Item(i)
If Not Fso.FolderExists(szPath) Then Call Fso.CreateFolder(szPath)
更多精彩
赞助商链接