/
bash_profile
58 lines (42 loc) · 2.03 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
# See following for more information: http://www.infinitered.com/blog/?p=10
# Identify OS and Machine -----------------------------------------
export OS=`uname -s | sed -e 's/ */-/g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
export OSVERSION=`uname -r`; OSVERSION=`expr "$OSVERSION" : '[^0-9]*\([0-9]*\.[0-9]*\)'`
export MACHINE=`uname -m | sed -e 's/ */-/g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
export PLATFORM="$MACHINE-$OS-$OSVERSION"
# Note, default OS is assumed to be OSX
# Path ------------------------------------------------------------
if [ "$OS" = "darwin" ] ; then
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:$PATH # OS-X Specific, with MacPorts and MySQL installed
#export PATH=/opt/local/bin:/opt/local/sbin:$PATH # OS-X Specific, with MacPorts installed
fi
if [ -d ~/bin ]; then
export PATH=:~/bin:$PATH # add your bin folder to the path, if you have it. It's a good place to add all your scripts
fi
if [ -d ~/cl/bin ]; then
export PATH=:~/cl/bin:$PATH # add your bin folder to the path, if you have it
fi
# Load in .bashrc -------------------------------------------------
source ~/.bashrc
if [ -f ~/.bashrc_local ]; then
source ~/.bashrc_local
fi
# Hello Messsage --------------------------------------------------
echo -e "Kernel Information: " `uname -smr`
echo -e "`bash --version`"
echo -ne "Uptime: "; uptime
echo -ne "Server time is: "; date
# Notes: ----------------------------------------------------------
# When you start an interactive shell (log in, open terminal or iTerm in OS X,
# or create a new tab in iTerm) the following files are read and run, in this order:
# profile
# bashrc
# .bash_profile
# .bashrc (only because this file is run (sourced) in .bash_profile)
#
# When an interactive shell, that is not a login shell, is started
# (when you run "bash" from inside a shell, or when you start a shell in
# xwindows [xterm/gnome-terminal/etc] ) the following files are read and executed,
# in this order:
# bashrc
# .bashrc