From e20f410cb95fc561191b7739c02fdc729e51279c Mon Sep 17 00:00:00 2001 From: XuehaiPan Date: Tue, 29 Dec 2020 18:18:42 +0800 Subject: [PATCH] Update instructions for Homebrew installation --- help/_posts/1970-01-01-homebrew.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/help/_posts/1970-01-01-homebrew.md b/help/_posts/1970-01-01-homebrew.md index 6380ffe..b25d127 100644 --- a/help/_posts/1970-01-01-homebrew.md +++ b/help/_posts/1970-01-01-homebrew.md @@ -26,11 +26,16 @@ export HOMEBREW_BOTTLE_DOMAIN="https://{{ site.hostname }}/homebrew-bottles" 最后,在终端运行以下命令以安装 Homebrew/Linuxbrew: ```bash -# 获取并修改安装脚本中的仓库源,运行以安装 Homebrew/Linuxbrew +# 从 GitHub 获取安装脚本,并修改其中的仓库源,运行以安装 Homebrew/Linuxbrew /bin/bash -c "$( curl -fsSL https://github.com/Homebrew/install/raw/master/install.sh | sed 's|^BREW_REPO=.*$|BREW_REPO="https://{{ site.hostname }}/git/homebrew/brew.git"|g' )" + +# 若以上命令遇到网络问题,则从本镜像下载安装脚本并安装 Homebrew/Linuxbrew +git clone --depth=1 https://{{ site.hostname }}/git/homebrew/install.git brew-install +/bin/bash -c "$(sed 's|^BREW_REPO=.*$|BREW_REPO="https://{{ site.hostname }}/git/homebrew/brew.git"|g' brew-install/install.sh)" +rm -rf brew-install ``` 这样在首次安装的时候也可以使用镜像。