dotfiles/.config/rodolphe/.setpath.sh
2021-09-12 12:24:06 +02:00

11 lines
262 B
Bash

add_path() {
BIN_PATH="$1"
if [ -d "$BIN_PATH" ]; then
found=$(echo $PATH | tr ':' '\n' | grep -w "$BIN_PATH")
[ ! "$found" ] && export PATH="$BIN_PATH:$PATH"
true
fi
}
add_path "$HOME/.local/bin"
add_path "$HOME/.cargo/bin"