-
Notifications
You must be signed in to change notification settings - Fork 0
/
.profile
115 lines (90 loc) · 2.86 KB
/
.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ]; then
export PATH="$PATH:$HOME/bin"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ]; then
export PATH="$PATH:$HOME/.local/bin"
fi
# Nodejs installed by nvm
if [ -s "$HOME/.nvm/nvm.sh" ]; then
export NVM_DIR="$HOME/.nvm"
# add --no-use to work workaround the slow startup
source "$NVM_DIR/nvm.sh" --no-use
# assume the nvm alias default is set to the specific version
# i.e nvm alias default 12.14.1
if [ -s "$NVM_DIR/alias/default" ]; then
NVM_NODE="$NVM_DIR/versions/node/v$(<$NVM_DIR/alias/default)/bin"
[ -d "$NVM_NODE" ] && export PATH="$PATH:$NVM_NODE"
fi
fi
# Nodejs installed by package managers
# npmrc: prefix = ${HOME}/.npm-packages
if [ -d "$HOME/.npm-packages/bin" ]; then
export PATH="$PATH:$HOME/.npm-packages/bin"
fi
# Install Go manually from tar https://golang.org/doc/install#tarball
if [ -d "/usr/local/go" ]; then
export GOROOT="/usr/local/go"
fi
# brew install go
if [ -d "/usr/local/opt/go" ]; then
export GOROOT="/usr/local/opt/go/libexec"
fi
# pacman -S go
if [ -d "/usr/lib/go" ]; then
export GOROOT="/usr/lib/go"
fi
# dnf install golang
if [ -d "/usr/lib/golang" ]; then
export GOROOT="/usr/lib/golang"
fi
# Set PATH if go is installed
if [ -d "$GOROOT" ]; then
export GO111MODULE=on
export GOPATH="$HOME/go"
test -d "$GOPATH" || mkdir "$GOPATH"
export PATH="$PATH:$GOROOT/bin:$GOPATH/bin"
fi
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
if [ -d "$HOME/.rvm/bin" ]; then
export PATH="$PATH:$HOME/.rvm/bin"
. "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
fi
# Add Rust which is installed via the default rustup
if [ -d "$HOME/.cargo/bin" ]; then
export PATH="$PATH:$HOME/.cargo/bin"
fi
# Java
if [ -d "$HOME/.jenv/bin" ]; then
export PATH="$PATH:$HOME/.jenv/bin"
fi
# Android on MacOS
if [ -d "$HOME/Library/Android/sdk" ]; then
export ANDROID_HOME="$HOME/Library/Android/sdk"
fi
# Android on Linux
if [ -d "$HOME/Android/Sdk" ]; then
export ANDROID_HOME="$HOME/Android/Sdk"
fi
if [ -d "$ANDROID_HOME" ]; then
export PATH="$PATH:$ANDROID_HOME/platform-tools"
fi
if [ -d "$HOME/flutter/bin" ]; then
export PATH="$PATH:$HOME/flutter/bin"
fi
if [ -d "$HOME/dart-sdk/bin" ]; then
export PATH="$PATH:$HOME/dart-sdk/bin"
fi
if [ -d "$HOME/.fly" ]; then
export FLYCTL_INSTALL="$HOME/.fly"
export PATH="$PATH:$FLYCTL_INSTALL/bin"
fi