跳到主要内容

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

浏览文件

brew-install-version.sh

38 行 · 1.1 KB历史下载
1#!/bin/bash
2
3# SPDX-FileCopyrightText: Copyright The Lima Authors
4# SPDX-License-Identifier: Apache-2.0
5
6# This script only works for formulas in the homebrew-core.
7# It assumes the homebrew-core has been checked out into ./homebrew-core.
8# It only needs commit messages, so the checkout can be filtered with tree:0.
9
10set -eu -o pipefail
11
12FORMULA=$1
13VERSION=$2
14
15export HOMEBREW_NO_AUTO_UPDATE=1
16export HOMEBREW_NO_INSTALL_UPGRADE=1
17export HOMEBREW_NO_INSTALL_CLEANUP=1
18
19TAP=lima/tap
20if ! brew tap | grep -q "^${TAP}\$"; then
21 brew tap-new "$TAP"
22fi
23
24# Get the latest commit id for the commit that updated this bottle
25SHA=$(git -C homebrew-core log --max-count 1 --grep "^${FORMULA}: update ${VERSION} bottle" --format="%H")
26if [[ -z $SHA ]]; then
27 echo "${FORMULA} ${VERSION} not found"
28 exit 1
29fi
30
31OUTPUT="$(brew --repo "$TAP")/Formula/${FORMULA}.rb"
32RAW="https://raw.githubusercontent.com/Homebrew/homebrew-core"
33curl -s "${RAW}/${SHA}/Formula/${FORMULA::1}/${FORMULA}.rb" -o "$OUTPUT"
34
35if brew ls -1 | grep -q "^${FORMULA}\$"; then
36 brew uninstall "$FORMULA" --ignore-dependencies
37fi
38brew install "${TAP}/${FORMULA}"