Prevent from duplicated entries in PATH.

This commit is contained in:
Gea-Suan Lin
2023-04-07 21:45:07 +08:00
parent 26e16e9e52
commit 30c57e1038
4 changed files with 38 additions and 8 deletions

View File

@@ -51,10 +51,16 @@ export HISTTIMEFORMAT="%y/%m/%d %T "
export HOMEBREW_NO_ANALYTICS=1
export LESS="-EfmrSwX"
export LSCOLORS="gxfxcxdxbxegedabagacad"
export PATH="${HOME}/bin:${HOME}/.local/bin:${PATH}"
export PYTHONDONTWRITEBYTECODE=yes
export QUILT_PATCHES="debian/patches"
#
if [[ ! "${PATH}" =~ "(^|:)${HOME}/bin(:|$)" ]]; then
export PATH="${HOME}/bin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)${HOME}/\\.local/bin(:|$)" ]]; then
export PATH="${HOME}/.local/bin:${PATH}"
fi
#
if [ -e /usr/lib/jvm/default-java ]; then
export JAVA_HOME=/usr/lib/jvm/default-java
fi