-
Notifications
You must be signed in to change notification settings - Fork 0
/
path.sh
49 lines (37 loc) · 896 Bytes
/
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
path_prepend() {
if [[ $# == 0 ]]
then declare path="$PWD"
else declare path="$1"
fi
[[ ! -d $path ]] && return
export PATH="$path:$PATH"
}
path_append() {
if [[ $# == 0 ]]
then declare path="$PWD"
else declare path="$1"
fi
[[ ! -d $path ]] && return
export PATH="$PATH:$path"
}
latest_jetbrains_bin() {
echo -n $(ls -d /opt/JetBrains/$1-* | sort | tail -n 1)
echo -n "/bin"
}
path_prepend "/opt/arduino-1.8.5/"
# Dot Bin
path_prepend "$DOT_DIR/bin"
# Python Pip
path_append "$HOME/.local/bin"
# PHP Composer
path_append "$HOME/.config/composer/vendor/bin"
# JetBrains IDEs
if [[ -d /opt/JetBrains ]]
then
path_append $(latest_jetbrains_bin DataGrip)
path_append $(latest_jetbrains_bin pycharm)
path_append $(latest_jetbrains_bin idea)
path_append $(latest_jetbrains_bin clion)
fi
# Isolinear Build
path_append "$DEV_DIR/mduk/Isolinear/.build/bin"