-
Notifications
You must be signed in to change notification settings - Fork 0
/
Darwin_bash_profile
172 lines (146 loc) · 4 KB
/
Darwin_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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
if [ -d /opt/homebrew ]; then
HOMEBREW=/opt/homebrew
else
HOMEBREW=/usr/local
fi
# setup for keychain
SSH_KEY=$HOME/.ssh/mgalloy-20240904
if [ -a "$SSH_KEY" ]; then
DESKTOP=`uname -n`
$HOMEBREW/bin/keychain --quiet --agents ssh "$SSH_KEY"
source $HOME/.keychain/$DESKTOP-sh
else
echo "Keys not present; password-less login not available."
fi
# setup command line environment
from=`who am i | sed -n 's/.*(\(.*\))/\1/p'`
if [ $from ]; then
export PS1="\[\e]1;\h:\W\a\e]2;\h:\w\a\e[31;1m\]\W\$\[\e[0m\] "
else
export PS1="\[\e]1;\h:\W\a\e]2;\h:\w\a\e[34;1m\]\W\$\[\e[0m\] "
fi
export CLICOLOR=1
shopt -s histappend
shopt -s checkwinsize
export PROMPT_COMMAND='history -a'
export LANG=en_US.UTF-8
export HISTSIZE=2000
export EDITOR="emacs -nw"
export PATH=.:$HOME/bin:$HOME/software/bin:$PATH
export PATH=/usr/local/bin:/usr/local/sbin:/usr/games:/opt/homebrew/bin:$PATH
export LD_LIBRARY_PATH=$HOME/lib:$HOME/lib64
export BASH_SILENCE_DEPRECATION_WARNING=1
if [ -d $HOME/.gem/ruby/1.8/bin ]; then
export PATH=$HOME/.gem/ruby/1.8/bin:$PATH
fi
# setup iTerm2
function iterm_notify {
printf '\e]9;%s\a' "$@"
}
function iterm_bounce {
printf '\e]1337;RequestAttention=yes\a'
}
function iterm_badge {
printf "\e]1337;SetBadgeFormat=%s\a" $(echo "$@" | base64)
}
# add TeX tools to path
TEXLIVE_BINDIR=/usr/local/texlive/current/bin/universal-darwin
if [ -d $TEXLIVE_BINDIR ]; then
export PATH=$TEXLIVE_BINDIR:$PATH
else
echo "TeX Live not present"
fi
# setup TaskDL
export TASKDL2_DIR=$HOME/projects/taskdl-2.4/install
if [ -d $TASKDL2_DIR ]; then
export PATH=$TASKDL2_DIR/bin:$PATH
else
if [ "x$SSH_TTY" != "x" ]; then
echo "TaskDL not present in $TASKDL2_DIR"
fi
fi
# setup mpiDL
export MPIDL_DIR=$HOME/software/mpidl-par
if [ -d $MPIDL_DIR ]; then
export PATH=$PATH:$MPIDL_DIR/bin
else
if [ "x$SSH_TTY" != "x" ]; then
echo "mpiDL not present in $MPIDL_DIR"
fi
fi
# setup mglib
export MGLIB_DIR=$HOME/software/mglib
if [ -d $MGLIB_DIR ]; then
export PATH=$MGLIB_DIR/bin:$PATH
else
if [ "x$SSH_TTY" != "x" ]; then
echo "mglib is not present in $MGLIB_DIR"
fi
fi
# setup mgunit
export MGUNIT_DIR=$HOME/software/mgunit
if [ -d $MGUNIT_DIR ]; then
export PATH=$MGUNIT_DIR/bin:$PATH
else
if [ "x$SSH_TTY" != "x" ]; then
echo "mgunit is not present in $MGUNIT_DIR"
fi
fi
# setup CUDA
# if /usr/sbin/ioreg -l | grep -i nvidia > /dev/null; then
# if [ -d /usr/local/cuda ]; then
# export PATH=/usr/local/cuda/bin:$PATH
# else
# echo "CUDA not present in /usr/local/cuda"
# fi
# fi
# setup rIDL
if [ -d $HOME/software/ridl ]; then
export MANPATH=$HOME/software/ridl/share/man:$MANPATH
else
echo "rIDL not installed in $HOME/software/ridl"
fi
# setup easy_install build architecture
export ARCHFLAGS="-arch x86_64"
#if [ -f /usr/local/etc/bash_completion ]; then
# source /usr/local/etc/bash_completion
#fi
if [ -a $HOME/.aliases ]; then
source $HOME/.aliases
else
echo "Aliases not present in $HOME/.aliases"
fi
if [ -a $HOME/.git-completion.bash ]; then
source $HOME/.git-completion.bash
else
echo "git completion not present"
fi
# setup heasoft (ftools, etc.)
HEASOFT_DIR=$HOME/software/heasoft-install/x86_64-apple-darwin14.1.0
if [ -d $HEASOFT ]; then
export FTOOLS=$HEASOFT_DIR
export PATH=$HEASOFT_DIR/bin:$PATH
fi
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
# setup poetry
if [ -d $HOME/.poetry/bin ]; then
export PATH=$HOME/.poetry/bin:$PATH
fi
# setup pyenv
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/mgalloy/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/mgalloy/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/mgalloy/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/mgalloy/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<