-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash_profile
110 lines (91 loc) · 3.28 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
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
# -------------------------------------------------------------------
# .bash_profile
#
# This file is executed for all interactive shells, i.e., ones you
# log into directly. It may be that some console applications
# (Terminal) execute this for all new tabs or instances.
# -------------------------------------------------------------------
# -------------------------------------------------------------------
# Set some variables that may be useful
# -------------------------------------------------------------------
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
SESSION_TYPE=remote/ssh
else
case $(ps -o comm= -p $PPID) in
sshd|*/sshd) SESSION_TYPE=remote/ssh;;
esac
fi
# -------------------------------------------------------------------
# Build a PATH environment variable
# the lower it is the earlier in the path it is
# -------------------------------------------------------------------
# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
PATH="~/bin:${PATH}"
fi
# set PATH so it includes /usr/sbin if it exists
if [ -d /usr/sbin ] ; then
PATH="/usr/sbin:${PATH}"
fi
# set PATH so it includes /sbin if it exists
if [ -d /sbin ] ; then
PATH="/sbin:${PATH}"
fi
# set PATH so it includes /usr/local/sbin if it exists
if [ -d /usr/local/sbin ] ; then
PATH="/usr/local/sbin:${PATH}"
fi
# set PATH so it includes /usr/local/bin if it exists
if [ -d /usr/local/bin ] ; then
PATH="/usr/local/bin:${PATH}"
fi
# set PATH so it includes /opt/local/bin if it exists
if [ -d /opt/local/bin ] ; then
PATH="/opt/local/bin:${PATH}"
fi
# set PATH so it includes /opt/local/sbin if it exists
if [ -d /opt/local/sbin ] ; then
PATH="/opt/local/sbin:${PATH}"
fi
# set PATH so it includes /opt/local/libexec/gnubin if it exists
if [ -d /opt/local/libexec/gnubin ] ; then
PATH="/opt/local/libexec/gnubin:${PATH}"
fi
# set PATH so it includes /opt/local/libexec/gnubin if it exists
if [ -d /opt/puppetlabs/bin/ ] ; then
PATH="/opt/puppetlabs/bin/:${PATH}"
fi
# -------------------------------------------------------------------
# Source my bashrc file
# -------------------------------------------------------------------
# get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# -------------------------------------------------------------------
# Launch screen or byobu if they are available and we are on a remote session
# -------------------------------------------------------------------
#if [ "$SESSION_TYPE"=="remote/ssh" ] && command_exists byobu-launcher ; then
# case "$-" in *i*) byobu-launcher && exit 0; esac;
#fi
#if [ "$SESSION_TYPE"=="remote/ssh" ] && command_exists screen && [ "$TERM"!="screen" ] && [ -f ~/.dotfiles/bin/scratch ]; then
# ~/.dotfiles/bin/scratch
#fi
#HOSTNAME=$(hostname)
#if [ "${HOSTNAME:0:6}" == "tools." ]; then
# case "$-" in *i*) byobu-launcher && exit 0; esac;
#fi
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<