From ab2c61e24d780c788562ffc6a2d8d9d62814c910 Mon Sep 17 00:00:00 2001 From: h0tznpl0tz Date: Tue, 9 Sep 2025 19:14:02 +0200 Subject: [PATCH] updated .bash_paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(bash_paths): ### CUSTOM PATH BASH FILE ### - ~/bin und ~/.local/bin nur einfügen, wenn vorhanden - doppelte Einträge verhindern - Pfad-Handling getrennt von anderen Einstellungen --- userprofiles/pl/.bash_paths | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/userprofiles/pl/.bash_paths b/userprofiles/pl/.bash_paths index 9dcd899..29a8dd1 100644 --- a/userprofiles/pl/.bash_paths +++ b/userprofiles/pl/.bash_paths @@ -1,4 +1,18 @@ ### CUSTOM PATH BASH FILE ### -# Persönliches bin-Verzeichnis -export PATH="$HOME/bin:$PATH" +# ~/bin und ~/.local/bin vorne anhängen, falls vorhanden +if [ -d "$HOME/bin" ]; then + case ":$PATH:" in + *":$HOME/bin:"*) : ;; + *) PATH="$HOME/bin:$PATH" ;; + esac +fi + +if [ -d "$HOME/.local/bin" ]; then + case ":$PATH:" in + *":$HOME/.local/bin:"*) : ;; + *) PATH="$HOME/.local/bin:$PATH" ;; + esac +fi + +export PATH