Test the directory before adding it
This commit is contained in:
parent
01472b6d05
commit
e75abb7795
1 changed files with 5 additions and 3 deletions
|
@ -1,4 +1,6 @@
|
||||||
BIN_PATH="$HOME/bin"
|
BIN_PATH="$HOME/bin"
|
||||||
|
if [ -d "$BIN_PATH" ]; then
|
||||||
found=$(echo $PATH | tr ':' '\n' | grep -w "$BIN_PATH")
|
found=$(echo $PATH | tr ':' '\n' | grep -w "$BIN_PATH")
|
||||||
[ ! "$found" ] && export PATH="$BIN_PATH:$PATH"
|
[ ! "$found" ] && export PATH="$BIN_PATH:$PATH"
|
||||||
true
|
true
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue