mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
Sync from Mac
This commit is contained in:
parent
90110e8fed
commit
02ed4d20fb
11 changed files with 163 additions and 42 deletions
33
mac/set_mirror.sh
Normal file
33
mac/set_mirror.sh
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# pip
|
||||
alias pip=pip3
|
||||
alias python=python3
|
||||
python -m pip install --upgrade pip
|
||||
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
# npm
|
||||
npm config set registry https://registry.npmmirror.com
|
||||
|
||||
|
||||
|
||||
# Homebrew
|
||||
# 手动设置
|
||||
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
|
||||
|
||||
# 注:自 brew 4.0 起,大部分 Homebrew 用户无需设置 homebrew/core 和 homebrew/cask 镜像,只需设置 HOMEBREW_API_DOMAIN 即可。
|
||||
# 如果需要使用 Homebrew 的开发命令 (如 `brew cat <formula>`),则仍然需要设置 homebrew/core 和 homebrew/cask 镜像。
|
||||
# 请按需执行如下两行命令:
|
||||
brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
|
||||
brew tap --custom-remote --force-auto-update homebrew/cask https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
|
||||
|
||||
# 除 homebrew/core 和 homebrew/cask 仓库外的 tap 仓库仍然需要设置镜像
|
||||
brew tap --custom-remote --force-auto-update homebrew/cask-fonts https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-fonts.git
|
||||
brew tap --custom-remote --force-auto-update homebrew/cask-versions https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-versions.git
|
||||
brew tap --custom-remote --force-auto-update homebrew/command-not-found https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-command-not-found.git
|
||||
brew tap --custom-remote --force-auto-update homebrew/services https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-services.git
|
||||
brew update
|
||||
|
||||
# 或使用下面的几行命令自动设置
|
||||
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
|
||||
for tap in core cask{,-fonts,-versions} command-not-found services; do
|
||||
brew tap --custom-remote --force-auto-update "homebrew/${tap}" "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-${tap}.git"
|
||||
done
|
||||
brew update
|
||||
Loading…
Add table
Add a link
Reference in a new issue