跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

prepare-account-signing.sh

21 行 · 1.1 KB历史下载
1#!/usr/bin/env bash
2# Optional Developer ID provisioning for macOS biometric Keychain access.
3set -euo pipefail
4profile="$1"
5team="$2"
6output="$3"
7bundle_id=io.github.lee-xeo.claude-cage
8[[ "$team" =~ ^[A-Z0-9]{10}$ ]] || { echo 'A valid Developer ID team is required.' >&2; exit 1; }
9security cms -D -i "$profile" -o "$output.profile.plist"
10profile_team=$(/usr/libexec/PlistBuddy -c 'Print :TeamIdentifier:0' "$output.profile.plist")
11profile_app=$(/usr/libexec/PlistBuddy -c 'Print :Entitlements:com.apple.application-identifier' "$output.profile.plist")
12[[ "$profile_team" == "$team" && "$profile_app" == "$team.$bundle_id" ]] || { echo 'Provisioning profile does not match the signing team and Cage bundle.' >&2; exit 1; }
13cat > "$output" <<PLIST
14<?xml version="1.0" encoding="UTF-8"?>
15<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
16<plist version="1.0"><dict>
17<key>com.apple.application-identifier</key><string>$team.$bundle_id</string>
18<key>com.apple.developer.team-identifier</key><string>$team</string>
19<key>keychain-access-groups</key><array><string>$team.$bundle_id</string></array>
20</dict></plist>
21PLIST