@@ -16,6 +16,7 @@ from __future__ import print_function
16
16
import argparse
17
17
import os
18
18
import sys
19
+ import pdb
19
20
20
21
sys .path .append (os .path .dirname (__file__ ))
21
22
@@ -52,6 +53,21 @@ def update_working_copy(repo_path):
52
53
else :
53
54
check_call ([ "svn" , "update" ])
54
55
56
+ def obtain_additional_swift_sources ():
57
+ additional_repos = {
58
+ 'swift' : 'https://github.com/apple/swift.git' ,
59
+ 'llvm' : 'https://github.com/apple/swift-llvm.git' ,
60
+ 'clang' : 'https://github.com/apple/swift-clang.git' ,
61
+ 'lldb' : 'https://github.com/apple/swift-lldb.git' ,
62
+ 'cmark' : 'https://github.com/apple/swift-cmark.git' ,
63
+ 'llbuild' : 'https://github.com/apple/swift-llbuild.git' ,
64
+ 'swiftpm' : 'https://github.com/apple/swift-package-manager.git' ,
65
+ 'swift-corelibs-xctest' : 'https://github.com/apple/swift-corelibs-xctest.git' ,
66
+ 'swift-corelibs-foundation' : 'https://github.com/apple/swift-corelibs-foundation.git'
67
+ }
68
+ for dir_name , repo in additional_repos .iteritems ():
69
+ print ("--- Cloning '" + dir_name + "' ---" )
70
+ check_call (['git' , 'clone' , repo , dir_name ])
55
71
56
72
def main ():
57
73
parser = argparse .ArgumentParser (
@@ -63,12 +79,17 @@ By default, updates your checkouts of Swift, SourceKit, LLDB, and SwiftPM.""")
63
79
parser .add_argument ("-a" , "--all" ,
64
80
help = "also update checkouts of llbuild, LLVM, and Clang" ,
65
81
action = "store_true" )
82
+ parser .add_argument ("-c" , "--clone" ,
83
+ help = "Obtain Sources for Swift and Related Projects" ,
84
+ action = "store_true" )
66
85
args = parser .parse_args ()
67
86
68
87
if args .all :
69
88
update_working_copy (os .path .join (SWIFT_SOURCE_ROOT , "llbuild" ))
70
89
update_working_copy (os .path .join (SWIFT_SOURCE_ROOT , "llvm" ))
71
90
update_working_copy (os .path .join (SWIFT_SOURCE_ROOT , "clang" ))
91
+ if args .clone :
92
+ obtain_additional_swift_sources ()
72
93
73
94
update_working_copy (os .path .join (SWIFT_SOURCE_ROOT , "swift" ))
74
95
update_working_copy (
0 commit comments