-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpaths
More file actions
executable file
·36 lines (30 loc) · 780 Bytes
/
paths
File metadata and controls
executable file
·36 lines (30 loc) · 780 Bytes
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
#!/usr/bin/env bash
# Rust
export CARGO_HOME="$HOME/.cargo"
# Java
JAVA_HOME="$(/usr/libexec/java_home -v 21)"
export JAVA_HOME
# Kotlin
export KOTLIN_HOME="/usr/local/opt/kotlin/"
# Configure the paths
paths=(
"$HOME/.bin" # User
"$HOMEBREW_PREFIX/bin" # Homebrew
/usr/local/bin
"$CARGO_HOME/bin" # Rust
"$JAVA_HOME/bin" # Java
"$HOMEBREW_PREFIX/sbin" # Homebrew sbin
/usr/local/sbin
/usr/bin # System
/bin
/usr/sbin
/sbin
"$HOME/.lmstudio/bin" # LM Studio
"$HOME/.rd/bin" # Rancher
)
for search_path in "${paths[@]}"; do
[[ -d $search_path ]] \
&& [[ ":$PATH:" != *":$search_path:"* ]] \
&& PATH=$search_path:$PATH
done
export PATH