跳到主要内容

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

浏览文件

rebuild-macos-sshfs.sh

30 行 · 1.4 KB历史下载
1#!/bin/bash
2# Relink SSHFS from the frozen source distribution. An optional fourth argument
3# selects an already extracted/patched source tree for local modifications.
4set -euo pipefail
5[[ $# == 3 || $# == 4 ]] || { echo 'Usage: rebuild-macos-sshfs.sh /source-bundle /macfuse-sdk/usr/local /output [patched-source-tree]' >&2; exit 2; }
6materials=$1
7sdk=$2
8output=$3
9[[ $materials == /* && $sdk == /* && $output == /* && ! -e $output && -f $sdk/include/fuse3/fuse.h ]]
10work=$(mktemp -d)
11trap 'rm -rf "$work"' EXIT
12if [[ $# == 4 ]]; then
13 cd "$4"
14else
15 tar -xf "$materials/upstream/sshfs.tar.gz" -C "$work" --strip-components 1
16 cd "$work"
17 patch -p1 < "$materials/cage/sshfs-openwith.patch"
18fi
19cat > config.h <<'HEADER'
20#define PACKAGE_VERSION "3.7.6"
21#define IDMAP_DEFAULT "user"
22HEADER
23export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET:-14.0}
24glib=$materials/dependencies/glib
25intl=$materials/dependencies/gettext
26pcre=$materials/dependencies/pcre2
27clang -arch arm64 -O2 -D_REENTRANT -DHAVE_CONFIG_H -DFUSE_DARWIN_ENABLE_EXTENSIONS=0 -DFUSE_USE_VERSION=31 \
28 -I. -Icompat -I"$sdk/include/fuse3" -I"$glib/include/glib-2.0" -I"$glib/lib/glib-2.0/include" -I"$intl/include" \
29 sshfs.c cache.c compat/darwin_compat.c "$glib/lib/libgthread-2.0.a" "$glib/lib/libglib-2.0.a" "$intl/lib/libintl.a" "$pcre/lib/libpcre2-8.a" \
30 -L"$sdk/lib" -lfuse3 -liconv -framework Foundation -framework CoreFoundation -framework AppKit -framework Carbon -o "$output"