This commit is contained in:
luk
2024-08-03 14:24:45 +08:00
parent 29a2b5d7db
commit 9992fb331a
11 changed files with 62 additions and 49 deletions

24
mac-brew-install.sh Normal file
View File

@@ -0,0 +1,24 @@
# install: https://docs.brew.sh/Installation
# 用 *.pkg 安装的效果和命令行其实一样
echo "Installing Homebrew on MacOS"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# default brew path: /opt/homebrew for Apple Silicon, /usr/local/Homebrew for macOS Intel and /home/linuxbrew/.linuxbrew for Linux
# echo "if `brew --repo homebrew/core` not exists, you may need to git clone https://github.com/Homebrew/homebrew-core.git as well as for homebrew-cask"
# add brew to path:
# (echo; echo 'eval "$(brew shellenv)"') >> ~/.bash_profile
# eval "$(brew shellenv)"
# 实际上执行了 on Apple Silicon
# export HOMEBREW_PREFIX="/opt/homebrew";
# export HOMEBREW_CELLAR="/opt/homebrew/Cellar";
# export HOMEBREW_REPOSITORY="/opt/homebrew";
# export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
# export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:";
# export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";
#
# uninstall: https://github.com/homebrew/install#uninstall-homebrew
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
# update brew itself: brew update