28 lines
1.2 KiB
Bash
28 lines
1.2 KiB
Bash
#!/bin/bash
|
||
|
||
set +x
|
||
|
||
if [[ ! -d $(brew --repo homebrew/cask-fonts) ]]; then
|
||
mkdir -p $(brew --repo homebrew/cask-fonts)
|
||
fi
|
||
|
||
if [[ ! -d $(brew --repo homebrew/cask-drivers) ]]; then
|
||
mkdir -p $(brew --repo homebrew/cask-drivers)
|
||
fi
|
||
|
||
if [[ ! -d $(brew --repo homebrew/cask) ]]; then
|
||
mkdir -p $(brew --repo homebrew/cask)
|
||
fi
|
||
|
||
# brew 程序本身,Homebrew/Linuxbrew 相同
|
||
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
|
||
|
||
# 以下针对 mac OS 系统上的 Homebrew
|
||
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
|
||
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
|
||
git -C "$(brew --repo homebrew/cask-fonts)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-fonts.git
|
||
git -C "$(brew --repo homebrew/cask-drivers)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-drivers.git
|
||
|
||
# 以下针对 Linux 系统上的 Linuxbrew
|
||
# git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/linuxbrew-core.git
|