You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
351 B
Bash

#!/usr/bin/env bash
function add-path {
dir="$1"
if [[ $PATH =~ "$dir" ]]; then
return
fi
if [[ -d $dir ]]; then
PATH=$dir:$PATH
fi
}
add-path /usr/local/go/bin
add-path ~/.bin
add-path ~/.cargo/bin
add-path ~/.deno/bin
add-path ~/.local/bin
add-path ~/bin
add-path ~/go/bin
add-path ~/opt/bin
unset -f add-path