2016-09-26 15:40:04 +02:00
|
|
|
DOTFILES="$HOME/.dotfiles"
|
|
|
|
#Add DOTFILES/bin/ to PATH
|
2016-09-26 18:11:51 +02:00
|
|
|
DOTBIN="$DOTFILES/bin"
|
2016-10-06 03:21:13 +02:00
|
|
|
|
|
|
|
addpath() { case ":${PATH:=$1}:" in *:$1:*) ;; *) PATH="$1:$PATH" ;; esac; }
|
|
|
|
|
|
|
|
if [ -d "$DOTBIN" ]
|
|
|
|
then
|
|
|
|
addpath "$DOTBIN"
|
2016-09-26 15:40:04 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Always try to use vi(m) if possible
|
|
|
|
export EDITOR="vi"
|
|
|
|
|
|
|
|
|
|
|
|
# Source Envs
|
2016-10-06 03:21:13 +02:00
|
|
|
DOTENVS="$DOTFILES/envs.d"
|
|
|
|
if [ -d "$DOTENVS" ]
|
|
|
|
then
|
|
|
|
for f in "$DOTENVS/*.active"
|
|
|
|
do
|
|
|
|
if [ "$f" = "$DOTENVS/*.active" ]
|
|
|
|
then
|
|
|
|
break
|
|
|
|
fi
|
2016-09-26 15:40:04 +02:00
|
|
|
|
2016-10-06 03:21:13 +02:00
|
|
|
source "$f"
|
|
|
|
done
|
|
|
|
fi
|
2016-09-26 15:40:04 +02:00
|
|
|
|
|
|
|
# Source Bashrc if BASH
|
2016-10-11 23:18:39 +02:00
|
|
|
if [ "$BASH" ] && [ -f $DOTFILES/bash/rc ]
|
2016-10-06 03:21:13 +02:00
|
|
|
then
|
2016-10-11 23:18:39 +02:00
|
|
|
source $DOTFILES/bash/rc
|
2016-09-26 15:40:04 +02:00
|
|
|
fi
|