Skip to content

Commit 74a1d05

Browse files
committed
Move additional repo cloning into the update-checkout py script
1 parent 665b08b commit 74a1d05

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

utils/clone_resources.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

utils/update-checkout

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ from __future__ import print_function
1616
import argparse
1717
import os
1818
import sys
19+
import pdb
1920

2021
sys.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

5672
def 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

Comments
 (0)