Skip to content

Commit 010d2f9

Browse files
Fix incremental installer (#2825)
A last minute refactor broke it for initial installs. Signed-off-by: Brentley Jones <[email protected]>
1 parent 53e40ec commit 010d2f9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

xcodeproj/internal/templates/incremental_installer.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,19 @@ dest_dir="$(dirname "${dest}")"
7070
fail "The destination directory does not exist or is not a directory" \
7171
"${dest_dir}"
7272

73+
# Copy over `xcschemes`
74+
readonly dest_xcschemes="$dest/xcshareddata/xcschemes"
75+
76+
mkdir -p "$dest_xcschemes"
77+
rsync \
78+
--archive \
79+
--chmod=u+w,F-x \
80+
--delete \
81+
"$src_xcschemes" "$dest_xcschemes/"
82+
7383
# Resolve the copy command (can't use `cp -c` if the files are on different
7484
# filesystems)
75-
if [[ $(stat -f '%d' "$src_xcworkspacedata") == $(stat -f '%d' "$dest/project.xcworkspace/contents.xcworkspacedata") ]]; then
85+
if [[ $(stat -f '%d' "$src_xcschemes") == $(stat -f '%d' "$dest_xcschemes") ]]; then
7686
readonly cp_cmd="cp -c"
7787
else
7888
readonly cp_cmd="cp"
@@ -84,16 +94,6 @@ readonly dest_project_pbxproj="$dest/project.pbxproj"
8494
$cp_cmd "$src_project_pbxproj" "$dest_project_pbxproj"
8595
chmod +w "$dest_project_pbxproj"
8696

87-
# Copy over `xcschemes`
88-
readonly dest_xcschemes="$dest/xcshareddata/xcschemes"
89-
90-
mkdir -p "$dest_xcschemes"
91-
rsync \
92-
--archive \
93-
--chmod=u+w,F-x \
94-
--delete \
95-
"$src_xcschemes" "$dest_xcschemes/"
96-
9797
# Copy over `generated.xcfilelist`
9898
readonly dest_generated_xcfilelist="$dest/rules_xcodeproj/generated.xcfilelist"
9999

0 commit comments

Comments
 (0)