Update instructions for Homebrew installation

This commit is contained in:
XuehaiPan 2020-12-29 18:18:42 +08:00
parent cd665280d5
commit e20f410cb9

View File

@ -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
```
这样在首次安装的时候也可以使用镜像。