-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.sh
36 lines (34 loc) · 826 Bytes
/
env.sh
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
export DOTFILES=${HOME}/dotfiles
export PATH=${PATH}:${HOME}/bin:${HOME}/local/bin:${DOTFILES}/bin:/usr/local/bin:/usr/local/sbin
export EDITOR=vim
UNAME=$(uname -s)
HOSTNAME=$(hostname)
ENVD=$DOTFILES/env.d
export EVENT_NOKQUEUE=1
loadenv() {
for f in $1/*.sh ; do
if [ -f $f ] ; then
source $f
fi
done
}
[ -f $ENVD/secret/env.sh ] && loadenv $ENVD/secret
[ $UNAME = 'Darwin' ] && loadenv $ENVD/darwin
[ $UNAME = 'Linux' ] && loadenv $ENVD/linux
[ $HOSTNAME = 'oglethorpe' ] && loadenv $ENVD/dreamhost
loadenv $ENVD
if [ $BASH ]; then
for f in $1/*.bash ; do
if [ -f $f ] ; then
source $f
fi
done
fi
if false && [ $ZSH_VERSION ] ; then
for f in $1/*.zsh ; do
if [ -f $f ] ; then
source $f
fi
done
fi
/bin/sh -c "cd ${DOTFILES}; git status --porcelain"