-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbash_profile
59 lines (47 loc) · 1.84 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
# ~/.bash_profile: executed by bash(1) for login shells.
# ----------------------------------------------------------------------------
# Set up profiling at the beginning of ~/.bash_profile
# Uncomment the lines below to enable profiling. Pick one form for PS4.
# Use `brew install coreutils` to install gdate on macOS, and use full path.
#exec {BASH_XTRACEFD}>/tmp/bash_profile.trace
#PS4='+ $(/opt/homebrew/bin/gdate "+%s.%N") ${BASH_SOURCE}:${LINENO}: '
#PS4='+ $(date "+%s.%N") ${BASH_SOURCE}:${LINENO}: '
#set -x
# ----------------------------------------------------------------------------
# Some systems don't use /usr/local for homebrew.
if [[ -d /opt/homebrew ]]; then
eval $(/opt/homebrew/bin/brew shellenv)
fi
# Include ~/.bashrc if it exists
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# Prepend ~/bin to the PATH
if [ -d ~/bin ]; then
PATH="${HOME}/bin:${PATH}"
fi
# Prepend python's `site.USER_BASE` bin directory to the PATH.
# On Linux, it should be ~/.local/bin
# On MacOS, it should be something like ~/Library/Python/3.7/bin
#py3_user_base=$(python3 -m site --user-base)
#if [[ -d ${py3_user_base} ]]; then
# PATH="${PATH}:${py3_user_base}/bin"
#fi
# Add ~/.local/bin to the PATH
PATH="$PATH:${HOME}/.local/bin"
PATH="$PATH:${HOME}/local/bin"
# Prepend sbin directory to PATH.
PATH="/usr/local/sbin:${PATH}"
# ----------------------------------------------------------------------------
# Finally, export our shell variables
export EDITOR='vim'
export PAGER="${PAGER:-less -R}"
export LC_ALL='en_US.UTF-8'
export LANG='en_US.UTF-8'
export PATH
# ----------------------------------------------------------------------------
# Teardown profiling at the end of ~/.bash_profile
# Disable tracing and close file descriptor
#set +x
#exec {BASH_XTRACEFD}>&-
# ----------------------------------------------------------------------------