跳到主要内容

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

浏览文件

test-mount-home.sh

31 行 · 822 B历史下载
1#!/usr/bin/env bash
2
3# SPDX-FileCopyrightText: Copyright The Lima Authors
4# SPDX-License-Identifier: Apache-2.0
5
6set -eu -o pipefail
7
8scriptdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
9# shellcheck source=common.inc.sh
10source "${scriptdir}/common.inc.sh"
11
12if [ "$#" -ne 1 ]; then
13 ERROR "Usage: $0 NAME"
14 exit 1
15fi
16
17NAME="$1"
18hometmp="${HOME_HOST:-$HOME}/lima-test-tmp"
19hometmpguest="${HOME_GUEST:-$HOME}/lima-test-tmp"
20INFO "Testing home access (\"$hometmp\")"
21rm -rf "$hometmp"
22mkdir -p "$hometmp"
23defer "rm -rf \"$hometmp\""
24echo "random-content-${RANDOM}" >"$hometmp/random"
25expected="$(cat "$hometmp/random")"
26got="$(limactl shell "$NAME" cat "$hometmpguest/random")"
27INFO "$hometmp/random: expected=${expected}, got=${got}"
28if [ "$got" != "$expected" ]; then
29 ERROR "Home directory is not shared?"
30 exit 1
31fi