跳到主要内容

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

浏览文件

lima

47 行 · 1.6 KB历史下载
1#!/bin/sh
2
3# SPDX-FileCopyrightText: Copyright The Lima Authors
4# SPDX-License-Identifier: Apache-2.0
5
6set -eu
7
8# Environment Variables
9# LIMA_INSTANCE: Specifies the name of the Lima instance to use. Default is "default".
10# LIMA_SHELL: Specifies the shell interpreter to use inside the Lima instance. Default is the user's shell configured inside the instance.
11# LIMA_WORKDIR: Specifies the initial working directory inside the Lima instance. Default is the current directory from the host.
12# LIMACTL: Specifies the path to the limactl binary. Default is "limactl" in $PATH.
13
14: "${LIMA_INSTANCE:=default}"
15: "${LIMA_SHELL:=}"
16: "${LIMA_WORKDIR:=}"
17: "${LIMACTL:=limactl}"
18
19if [ "$#" -eq 1 ]; then
20 if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
21 base="$(basename "$0")"
22 echo "Usage: ${base} [COMMAND...]"
23 echo
24 echo "${base} is an alias for \"${LIMACTL} shell ${LIMA_INSTANCE}\"."
25 echo "The instance name (\"${LIMA_INSTANCE}\") can be changed by specifying \$LIMA_INSTANCE."
26 echo
27 echo "The shell and initial workdir inside the instance can be specified via \$LIMA_SHELL"
28 echo "and \$LIMA_WORKDIR."
29 echo
30 echo "See \`${LIMACTL} shell --help\` for further information."
31 exit 0
32 elif [ "$1" = "-v" ] || [ "$1" = "--version" ]; then
33 exec "$LIMACTL" "$@"
34 fi
35fi
36
37set - --instance "$LIMA_INSTANCE" "$@"
38if [ -n "${LIMA_SHELL}" ]; then
39 set - --shell "$LIMA_SHELL" "$@"
40fi
41if [ -n "${LIMA_WORKDIR}" ]; then
42 set - --workdir "$LIMA_WORKDIR" "$@"
43fi
44# Avoid converting paths with MSYS2
45MSYS2_ARG_CONV_EXCL="*"
46export MSYS2_ARG_CONV_EXCL
47exec "$LIMACTL" shell "$@"