-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetpaths
29 lines (22 loc) · 900 Bytes
/
setpaths
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function unique_add_to_path() {
[[ ":$PATH:" != *":$1:"* ]] && PATH="${PATH}:$1"
}
# add script directory to path
base_dir=$(dirname $(readlink ~/.bashrc))
unique_add_to_path $base_dir/scripts
export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
unique_add_to_path "$GEM_HOME/bin"
unique_add_to_path "$GEM_HOME/gems/ruby-lsp-0.10.1/exe"
unique_add_to_path "$HOME/dev/install/bin"
unique_add_to_path "$HOME/dev/tools/rust-analyzer/bin"
unique_add_to_path "/usr/local/bin"
unique_add_to_path "/sbin"
unique_add_to_path "$HOME/.node_modules/bin"
unique_add_to_path "$HOME/.local/bin"
unique_add_to_path "$HOME/.cargo/bin"
unique_add_to_path "$HOME/.gem/ruby/2.5.0/bin"
unique_add_to_path "/var/lib/flatpak/exports/share"
unique_add_to_path "$HOME/.local/share/flatpak/exports/share"
unique_add_to_path "$HOME/dev/tools/flutter/bin"
unique_add_to_path "$HOME/.pulumi/bin"
unset unique_add_to_path