-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_profile
executable file
·162 lines (131 loc) · 4.51 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
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
# Dan Maas .bash_profile
# executed ONLY by the top-level (login) bash
# mainly used to set environment variables
# aliases belong in .bashrc, NOT HERE!
# If set, bash checks the window size after each command and, if
# necessary, updates the values of LINES and COLUMNS.
if [[ $BASH_VERSION != "" ]]; then
shopt -s checkwinsize
fi
# This is a little known and very underrated shell variable. CDPATH does
# for the cd built-in what PATH does for executables. By setting this
# wisely, you can cut down on the number of key-strokes you enter per
# day.
export CDPATH=".:~"
# Set this to to avoid having consecutive duplicate commands and other
# not so useful information appended to the history list. This will cut
# down on hitting the up arrow endlessly to get to the command before
# the one you just entered twenty times.
export HISTIGNORE="&:[bf]g:exit"
# A colon-separated list of suffixes to ignore when performing
# filename completion
export FIGNORE=":.pyc:~"
export EDITOR="$HOME/bin/edit"
export GNU_HOST=localhost # for gnuserv
export GNU_SECURE="$HOME/emacs/hosts" # ditto
# use nano for commit messages, etc
export CVSEDITOR="$HOME/bin/edit"
#export TERMINAL=rxvt
# add my personal bin directory to the path
export PATH="$HOME/bin:$PATH"
# this is my home CVS repository (via the master NFS share)
if [ ! $CVSROOT ]; then
export CVSROOT=/shared/cvs
fi
export GOPATH="${HOME}/cvs/go"
# detect operating system
DMAAS_OS=$(uname)
# canonicalize OS name
if [ "$DMAAS_OS" = "Linux" ]; then
DMAAS_OS="linux"
elif [ "$DMAAS_OS" = "Darwin" ]; then
DMAAS_OS="macosx"
elif [ "$DMAAS_OS" = "CYGWIN" ]; then
DMAAS_OS="cygwin"
elif [ "$DMAAS_OS" = "IRIX64" ]; then
DMAAS_OS="IRIX"
fi
export DMAAS_OS
# Linux-specific
if [ "$DMAAS_OS" = "linux" ]; then
# xterm doesn't always work due to a backwards incompatibility
# in Debian's libncurses4 with old Emacs binaries.
#export TERM=rxvt
sleep 0
fi
# Cygwin-specific
if [ "$DMAAS_OS" = "cygwin" ]; then
export HOME=/home/dmaas
fi
# OSX-specific
if [ "$DMAAS_OS" = "macosx" ]; then
# set up Fink environment
if [ -f /sw/bin/init.sh ]; then
. /sw/bin/init.sh
fi
# not sure why this isn't being set by OSX
# necessary for emacs terminal colors
#export TERM=xterm-color
# enable X!
#export DISPLAY=:0
# databases
PATH="/usr/local/mongodb/bin:/usr/local/mysql/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:${PATH}"
# PATH for Python 3 installs
#PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
#PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
# Java SDK on OSX
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
# Google cloud SDK
PATH="${PATH}:${HOME}/google-cloud-sdk/bin"
# Android SDK
export ANDROID_HOME="${HOME}/Library/Android/sdk"
PATH="${PATH}:${ANDROID_HOME}/platform-tools"
export PATH
# raise maxfiles - mainly for MongoDB
ulimit -n 4096
fi
# set gamma for the Hitachi monitors
export GAMMA=2.0
# set Fotokem Cineon density standards
export DMIN=70
export DWHITE=720
export FILM_GAMMA=0.6
# set interp path (only for running under gdb, this is not required
# for normal use thanks to the wrapper scripts)
export INTERP_HOME="/usr/local/interp"
if [ `hostname` = "mbp15.local" ]; then
export PROJ="/Volumes/PNY128GB/shared/proj" # laptop
else
export PROJ="/shared/proj"
fi
# DJM hack for 2013 projects
export RMANTREE='/Applications/Pixar/RenderMan.app/Versions/RenderManProServer-16.5'
export PATH="${PATH}:${RMANTREE}/bin"
# re-enable Python DeprecationWarnings, but ignore some spurious ones
PYTHONWARNINGS="once::DeprecationWarning:"
PYTHONWARNINGS+=",ignore:the sets module:DeprecationWarning:"
PYTHONWARNINGS+=",ignore:Python 2.6 is no longer supported:DeprecationWarning:"
PYTHONWARNINGS+=",ignore:twisted.internet.interfaces.IStreamClientEndpointStringParser:DeprecationWarning:"
export PYTHONWARNINGS
# Run .bashrc
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# start ssh-agent
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
eval `ssh-agent`
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
#ssh-add -l > /dev/null || ssh-add
# if we're SSHing in, then try to chdir to the directory
# specified by the client.
# otherwise go to home directory, following symlinks
if [ -n "$SSH_CHDIR_DMAAS" ]; then
cd "$SSH_CHDIR_DMAAS"
elif [ -f /etc/spinpunch ]; then
cd `(. /etc/spinpunch && echo $GAME_DIR)`/gameserver
elif [ -d ~/temp ]; then
cd ~/temp
#cd ~/personal/asia2006
fi