替换源
# 替换brew.git:
cd "$(brew --repo)"
git remote set-url origin [https://mirrors.aliyun.com/homebrew/brew.git](https://mirrors.aliyun.com/homebrew/brew.git)
# 替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin [https://mirrors.aliyun.com/homebrew/homebrew-core.git](https://mirrors.aliyun.com/homebrew/homebrew-core.git)
# 替换homebrew-bottles:
echo 'export HOMEBREW_BOTTLE_DOMAIN=[https://mirrors.aliyun.com/homebrew/homebrew-bottles](https://mirrors.aliyun.com/homebrew/homebrew-bottles)' >> ~/.zshrc
source ~/.zshrc
# 替换homebrew-cask.git:
cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
git remote set-url origin [https://mirrors.ustc.edu.cn/homebrew-cask.git](https://mirrors.ustc.edu.cn/homebrew-cask.git)
关闭brew更新
export HOMEBREW_NO_AUTO_UPDATE=true