From ad1c438f0a72a7906633cc1ac99ea26e20d93bfd Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sat, 30 Mar 2024 11:34:25 -0500 Subject: [PATCH] .bashrc: Move extra homebrew config from .shenv-aether into .bashrc --- .bashrc | 14 ++++++++++---- .shenv-aether | 4 ---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.bashrc b/.bashrc index 510102b..39214f3 100644 --- a/.bashrc +++ b/.bashrc @@ -67,6 +67,8 @@ umask 0022 # PATH # --------------------------------------------------------------------------- +unset path_start path_end manpath_start manpath_end + # make sure $MANPATH has some sane defaults MANPATH="/usr/share/man:/usr/local/share/man:$MANPATH" @@ -78,10 +80,14 @@ PATH="/usr/local/bin:$PATH" path_start="$path_start:$HOME/bin" test -d "$HOME/sbin" && path_start="$path_start:$HOME/sbin" -# macOS homebrew: include non-prefixed coreutils -if [ -d "/opt/homebrew/opt/coreutils/libexec" ]; then - path_start="$path_start:/opt/homebrew/opt/coreutils/libexec/gnubin" - manpath_start="$manpath_start:/opt/homebrew/opt/coreutils/libexec/gnuman" +# macOS homebrew +if [ -x "/opt/homebrew/bin/brew" ]; then + eval "$(/opt/homebrew/bin/brew shellenv)" + # include non-prefixed coreutils + if [ -d "/opt/homebrew/opt/coreutils/libexec" ]; then + path_start="/opt/homebrew/opt/coreutils/libexec/gnubin:$path_start" + manpath_start="/opt/homebrew/opt/coreutils/libexec/gnuman:$manpath_start" + fi fi # SmartOS: local pkgin binaries diff --git a/.shenv-aether b/.shenv-aether index dbfd37f..b8863c4 100644 --- a/.shenv-aether +++ b/.shenv-aether @@ -1,7 +1,3 @@ -# homebrew -eval "$(/opt/homebrew/bin/brew shellenv)" -export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH" - # bash-completion [[ -r "/opt/homebrew/etc/profile.d/bash_completion.sh" ]] && . "/opt/homebrew/etc/profile.d/bash_completion.sh" -- 2.45.2