-
Notifications
You must be signed in to change notification settings - Fork 0
/
11-path.sh
58 lines (45 loc) · 1 KB
/
11-path.sh
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
add_path() {
if test ! -e "${1}"; then
# path does not exist, skip silently
return
fi
if test ! -d "${1}"; then
echo >&2 "${1} is not a directory!"
return
fi
case $PATH in
*${1}*)
# already present in $PATH
;;
*)
# append to $PATH
export PATH="${PATH}:${1}"
;;
esac
}
# fhs
add_path "/usr/local/bin"
add_path "/usr/bin"
add_path "/bin"
add_path "/usr/local/sbin"
add_path "/usr/sbin"
add_path "/sbin"
# home local
mkdir -p "${HOME}/.local/bin"
add_path "${HOME}/.local/bin"
mkdir -p "${HOME}/.local/appimages"
add_path "${HOME}/.local/appimages"
# neovim
add_path "/opt/nvim-linux64/bin"
# nim
add_path "${HOME}/.nim-lang/bin"
# zig
add_path "${HOME}/.zig"
# rust
add_path "${HOME}/.cargo/bin"
# platformio
add_path "${HOME}/.platformio/penv/bin"
# jetbrains shortcuts
add_path "${HOME}/.local/share/JetBrains/Toolbox/scripts"
# android
add_path "${HOME}/adb-fastboot/platform-tools"