feat: install脚本使用中文强调环境变量设置

This commit is contained in:
neo 2021-03-25 11:11:48 +08:00
parent 55324dfa88
commit c9a40d2b7d

View File

@ -727,6 +727,7 @@ ohai "Downloading and installing Homebrew..."
) || exit 1 ) || exit 1
if [[ ":${PATH}:" != *":${HOMEBREW_PREFIX}/bin:"* ]]; then if [[ ":${PATH}:" != *":${HOMEBREW_PREFIX}/bin:"* ]]; then
warn "看到此提示,一定要执行 Next steps 中的 环境变量设置!!!"
warn "${HOMEBREW_PREFIX}/bin is not in your PATH." warn "${HOMEBREW_PREFIX}/bin is not in your PATH."
fi fi
@ -775,8 +776,9 @@ case "$SHELL" in
;; ;;
esac esac
if [[ "$UNAME_MACHINE" == "arm64" ]] || [[ -n "${HOMEBREW_ON_LINUX-}" ]]; then if [[ "$UNAME_MACHINE" == "arm64" ]] || [[ -n "${HOMEBREW_ON_LINUX-}" ]]; then
echo "切记执行环境变量设置!,如已执行过请忽略。"
cat <<EOS cat <<EOS
- Add Homebrew to your ${tty_bold}PATH${tty_reset} in ${tty_underline}${shell_profile}${tty_reset}: - 添加 Homebrew 到 ${tty_underline}${shell_profile}${tty_reset} 文件的 ${tty_bold}PATH${tty_reset}:
echo 'eval "\$(${HOMEBREW_PREFIX}/bin/brew shellenv)"' >> ${shell_profile} echo 'eval "\$(${HOMEBREW_PREFIX}/bin/brew shellenv)"' >> ${shell_profile}
eval "\$(${HOMEBREW_PREFIX}/bin/brew shellenv)" eval "\$(${HOMEBREW_PREFIX}/bin/brew shellenv)"
EOS EOS
@ -791,8 +793,8 @@ if [[ -n "${non_default_repos}" ]]; then
printf " %s\n" "${additional_shellenv_commands[@]}" printf " %s\n" "${additional_shellenv_commands[@]}"
fi fi
echo "- Run \`brew help\` to get started" echo "- 运行 \`brew help\` 开始体验吧"
echo "- Further documentation: " echo "- 更多文档: "
echo " ${tty_underline}https://docs.brew.sh${tty_reset}" echo " ${tty_underline}https://docs.brew.sh${tty_reset}"
if [[ -n "${HOMEBREW_ON_LINUX-}" ]]; then if [[ -n "${HOMEBREW_ON_LINUX-}" ]]; then