-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.env.symlink
30 lines (24 loc) · 1.03 KB
/
.env.symlink
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
export DOTFILES_DIR="$(dirname $(readlink "$0"))"
export EDITOR='code'
export VSCODE_FORCE_USER_ENV=1
export GIT_TEMPLATE_DIR="${HOME}/.git-template"
export NODE_OPTIONS='--max-http-header-size=16384'
HOMEBREW_PREFIX=/usr/local
PATH="/usr/local/sbin:$PATH"
if [ -d /opt/homebrew ]; then
HOMEBREW_PREFIX=/opt/homebrew
PATH="/opt/homebrew/sbin:/opt/homebrew/bin:${PATH}"
fi
PATH="${HOME}/bin:${PATH}:${DOTFILES_DIR}/bin"
if hash composer &>/dev/null; then
PATH="$PATH:$HOME/.composer/vendor/bin"
export COMPOSER_MEMORY_LIMIT=-1
fi
# NVM.
if [ -f ${HOMEBREW_PREFIX}/opt/nvm/nvm.sh ]; then
export NVM_DIR="$HOME/.nvm"
[ -s "${HOMEBREW_PREFIX}/opt/nvm/nvm.sh" ] && . "${HOMEBREW_PREFIX}/opt/nvm/nvm.sh" # This loads nvm
[ -s "${HOMEBREW_PREFIX}/opt/nvm/etc/bash_completion.d/nvm" ] && . "${HOMEBREW_PREFIX}/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
fi
# Remove Dups
export PATH="$(echo "$PATH" | /usr/bin/awk 'BEGIN{RS=":";}{sub(sprintf("%c$",10),"");if(A[$0]){}else{A[$0]=1;printf(((NR==1)?"":":")$0)}}')"