Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions xcodeproj/internal/templates/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,24 @@ readonly dest_xcschemes="$dest/xcshareddata/xcschemes"

mkdir -p "$dest_xcschemes"

"$src_rsync" \
--archive \
--perms \
--chmod=u+w,F-x \
--delete \
"$src_xcschemes" "$dest_xcschemes/"

if [[ $(uname) == "Darwin" ]]; then
is_macos=1
readonly rsync="$src_rsync"
else
is_macos=0
readonly rsync="$(command -v rsync || true)"
[[ -n "$rsync" ]] || fail \
"Failed to locate host rsync." \
"rules_xcodeproj's bundled rsync is only supported on macOS project generation."
fi

"$rsync" \
--archive \
--perms \
--chmod=u+w,F-x \
--delete \
"$src_xcschemes" "$dest_xcschemes/"

# Resolve the copy command (can't use `cp -c` if the files are on different
# filesystems, or on Linux)
if [[ $is_macos -eq 1 &&
Expand Down
Loading