Fix PATH handling in .bash_profile for Darwin.

This commit is contained in:
Darren 'Tadgy' Austin 2023-10-28 21:53:05 +01:00
commit 5c761c9576

View file

@ -10,7 +10,6 @@ export LC_COLLATE="POSIX" # 'C' causes issues with some applications
# export LC_CTYPE="POSIX" # Not sure why I set this in the first place...
export LESS='-RM -j.5 -i -PM?f%F:stdin. -- Page %dt of %D -- %lt/%L (%Pt\%)$'
export PAGER="less"
export PATH="/opt/sbin:/usr/local/sbin:/usr/sbin:/sbin:$PATH"
export VISUAL="$EDITOR"
hash lesspipe >/dev/null 2>&1 && eval "$(SHELL=/bin/sh lesspipe)"
@ -24,6 +23,7 @@ if [[ "$PLATFORM" = "Linux" ]]; then
export LYNX_LSS="$HOME/.lynx.lss"
export MANPAGER="less"
export MANPATH="$HOME/.local/share/man:$MANPATH"
export PATH="/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
hash dircolors >/dev/null 2>&1 && eval "$(dircolors -b "$HOME/.dir_colors")"
hash gpgconf >/dev/null 2>&1 && {
GPG_SOCK_DIR="$(gpgconf --list-dirs | awk -F : '/socketdir:/ { print $2 }')"
@ -41,15 +41,15 @@ elif [[ "$PLATFORM" = "Darwin" ]]; then
export LSCOLORS="ExGxdxdxCxDxDxbcacbeae"
export MANPAGER="less -Mis -PM'Page %dt$'"
export MANPATH="/opt/local/share/man:$MANPATH"
export PATH="/opt/local/sbin:/opt/local/bin:$PATH"
export PATH="/opt/local/libexec/gnubin:/opt/local/sbin:/opt/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
printf "%s: %s\\n" "${BASH_SOURCE##*/}" "unsupported platform: $PLATFORM" >&2
fi
# Add bin directories to PATH.
[[ -d "$HOME/files/bin" ]] && export PATH="$HOME/files/bin:$PATH"
[[ -d "$HOME/.local/bin" ]] && export PATH="$HOME/.local/bin:$PATH"
[[ -d "$HOME/bin" ]] && export PATH="$HOME/bin:$PATH"
[[ -d "$HOME/files/bin" ]] && export PATH="$HOME/files/bin:$PATH"
# Screen.
hash screen >/dev/null 2>&1 && {