对Homebrew更新的话,需要更新四个模块的镜像
- Homebrew
 
- Homebrew Core
 
- Homebrew-bottles
 
- Homebrew Cask
 
USTC包含上述的所有源,而其他家都缺少Cask源,所以即便更换了其他的源,brew update依然龟速。
替换命令
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
   |  git -C "$(brew --repo)"remote set-url origin https://mirrors.ustc.edu.cn/brew.git
 
  git -C "$(brew --repo homebrew/core)"remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
 
  git -C "$(brew --repo homebrew/cask)"remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
 
 
  echo'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles'>> ~/.bash_profile source~/.bash_profile
 
  echo'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles'>> ~/.zshrc source~/.zshrc
 
  |