-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnew-swiftpm-fresh
More file actions
executable file
·62 lines (54 loc) · 1.41 KB
/
new-swiftpm-fresh
File metadata and controls
executable file
·62 lines (54 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
if [ -z "$1" ]; then
echo "usage: $0 <name> <branch>"
exit 1
else
name=$1
if [ -n "$2" ]; then
branch=$2
else
branch=main
fi
fi
mkdir $name
cd $name
git clone -b $branch https://github.com/swiftlang/swift-llbuild
cd swift-llbuild
git remote add work git@github.com:dschaefer2/swift-llbuild
gh repo set-default swiftlang/swift-llbuild
cd ..
git clone -b $branch https://github.com/swiftlang/swift-build
cd swift-build
git remote add work git@github.com:dschaefer2/swift-build
gh repo set-default swiftlang/swift-build
cd ..
git clone -b $branch https://github.com/swiftlang/swift-package-manager
cd swift-package-manager
git remote add work git@github.com:dschaefer2/swift-package-manager
gh repo set-default swiftlang/swift-package-manager
cd ..
git clone -b $branch https://github.com/swiftlang/sourcekit-lsp
cd sourcekit-lsp
git remote add work git@github.com:dschaefer2/sourcekit-lsp
gh repo set-default swiftlang/sourcekit-lsp
cd ..
mkdir -p $name.xcworkspace
cd $name.xcworkspace
cat > contents.xcworkspacedata <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:swift-llbuild">
</FileRef>
<FileRef
location = "group:swift-build">
</FileRef>
<FileRef
location = "group:swift-package-manager">
</FileRef>
<FileRef
location = "group:sourcekit-lsp">
</FileRef>
</Workspace>
EOF