-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_profile
67 lines (58 loc) · 1.42 KB
/
.bash_profile
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
59
60
61
62
63
64
65
66
67
#!/bin/bash
# ------------------------------------------------------------------------------
# brew
# ------------------------------------------------------------------------------
detect_os() {
if [ "$(uname)" == "Darwin" ]; then
PLATFORM=mac
elif [ "$(uname -s)" == "MINGW" ]; then
PLATFORM=windows
elif [ "$(uname -s)" == "Linux" ]; then
PLATFORM=linux
else
PLATFORM="Unknown OS"
abort "Your platform ($(uname -a)) is not supported."
fi
}
is_exists() {
which "$1" >/dev/null 2>&1
return $?
}
is_linux() {
if [ "$PLATFORM" == 'linux' ]; then
return 0
else
return 1
fi
}
is_mac() {
if [ "$PLATFORM" == 'mac' ]; then
return 0
else
return 1
fi
}
if [[ $(command -v brew) ]]; then
if is_linux; then
if [ -r "/home/linuxbrew/.linuxbrew/etc/profile.d/bash_completion.sh" ]; then
# shellcheck source=/dev/null
. "/home/linuxbrew/.linuxbrew/etc/profile.d/bash_completion.sh"
fi
fi
if is_mac; then
if [ -r "/opt/homebrew/etc/profile.d/bash_completion.sh" ]; then
# shellcheck source=/dev/null
. "/opt/homebrew/etc/profile.d/bash_completion.sh"
fi
fi
fi
# anyenv
export PATH="$HOME/.anyenv/bin:$PATH"
eval "$(anyenv init -)"
# ruff
# shellcheck source=/dev/null
. "$HOME/.cargo/env"
# Rancher Desktop
### MANAGED BY RANCHER DESKTOP START (DO NOT EDIT)
export PATH="/home/tqer39/.rd/bin:$PATH"
### MANAGED BY RANCHER DESKTOP END (DO NOT EDIT)