forked from bmatsuo/home
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc
executable file
·30 lines (25 loc) · 879 Bytes
/
bashrc
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
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
export PGDATA="/usr/local/var/postgres"
export PATH="/usr/local/bin:$PATH"
export EDITOR="vim"
# Platform detection
case `uname` in
'Darwin') PLATFORM='MacOSX';;
'Linux') PLATFORM='Linux';;
'SunOS') PLATFORM='Solaris';;
'FreeBSD') PLATFORM='FreeBSD';;
esac
# Initialization
if [ -d "$HOME/.bashrc.d/" ]; then
for s in `sort <(find $HOME/.bashrc.d/ | egrep '\.sh$' | egrep -v '(MacOSX|Linux|Solaris|FreeBSD)\.sh$' && find $HOME/.bashrc.d/ | egrep "$PLATFORM\\.sh\$") | uniq`; do
source $s
done
fi
# Initialization specific to the local machine
if [ -f "$HOME/.bashrc.local" ]; then
source "$HOME/.bashrc.local"
fi