@@ -16,6 +16,7 @@ from __future__ import print_function
1616import argparse
1717import os
1818import sys
19+ import pdb
1920
2021sys .path .append (os .path .dirname (__file__ ))
2122
@@ -52,6 +53,21 @@ def update_working_copy(repo_path):
5253 else :
5354 check_call ([ "svn" , "update" ])
5455
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 ])
5571
5672def main ():
5773 parser = argparse .ArgumentParser (
@@ -63,12 +79,17 @@ By default, updates your checkouts of Swift, SourceKit, LLDB, and SwiftPM.""")
6379 parser .add_argument ("-a" , "--all" ,
6480 help = "also update checkouts of llbuild, LLVM, and Clang" ,
6581 action = "store_true" )
82+ parser .add_argument ("-c" , "--clone" ,
83+ help = "Obtain Sources for Swift and Related Projects" ,
84+ action = "store_true" )
6685 args = parser .parse_args ()
6786
6887 if args .all :
6988 update_working_copy (os .path .join (SWIFT_SOURCE_ROOT , "llbuild" ))
7089 update_working_copy (os .path .join (SWIFT_SOURCE_ROOT , "llvm" ))
7190 update_working_copy (os .path .join (SWIFT_SOURCE_ROOT , "clang" ))
91+ if args .clone :
92+ obtain_additional_swift_sources ()
7293
7394 update_working_copy (os .path .join (SWIFT_SOURCE_ROOT , "swift" ))
7495 update_working_copy (
0 commit comments