ios: phone-ld re-sends the SDK when the phone's copy is gone
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
39a6560d7a
commit
a505cdb89d
1 changed files with 7 additions and 0 deletions
|
|
@ -40,6 +40,13 @@ job=/var/mobile/mulberry-build/ld.$$.$RANDOM
|
|||
ssh_=(ssh -i "$KEY" -o BatchMode=yes -o ConnectTimeout=10 -o ControlMaster=auto -o ControlPersist=60
|
||||
-o ControlPath="$HOME/.ssh/cm-phone-ld-%r@%h" "$IPHONE")
|
||||
"${ssh_[@]}" "mkdir -p $job"
|
||||
# The SDK copy on the phone may have been cleaned up: send it again (once, over the LAN).
|
||||
if ! "${ssh_[@]}" "[ -d $REMOTE_SDK/usr/lib ]"; then
|
||||
LOCAL_SDK=${SDK:-$HOME/.local/opt/dl/sdk18/iPhoneOS18.6.sdk}
|
||||
echo "phone-ld: copying the iOS SDK to the phone (one-time, ~300 MB over the LAN)…" >&2
|
||||
tar -cf - -C "$(dirname "$LOCAL_SDK")" "$(basename "$LOCAL_SDK")" | \
|
||||
"${ssh_[@]}" "mkdir -p $(dirname "$REMOTE_SDK") && tar -xf - -C $(dirname "$REMOTE_SDK")"
|
||||
fi
|
||||
# Ship inputs under unique names (two inputs may share a basename).
|
||||
stage=$(mktemp -d)
|
||||
trap 'rm -rf "$stage"' EXIT
|
||||
|
|
|
|||
Loading…
Reference in a new issue