mirror of
https://github.com/kastdeur/dotfiles.git
synced 2024-12-22 09:13:33 +01:00
36 lines
556 B
Bash
36 lines
556 B
Bash
DOTFILES="$HOME/.dotfiles"
|
|
#Add DOTFILES/bin/ to PATH
|
|
DOTBIN="$DOTFILES/bin"
|
|
|
|
addpath() { case ":${PATH:=$1}:" in *:$1:*) ;; *) PATH="$1:$PATH" ;; esac; }
|
|
|
|
if [ -d "$DOTBIN" ]
|
|
then
|
|
addpath "$DOTBIN"
|
|
fi
|
|
|
|
|
|
# Always try to use vi(m) if possible
|
|
export EDITOR="vi"
|
|
|
|
|
|
# Source Envs
|
|
DOTENVS="$DOTFILES/envs.d"
|
|
if [ -d "$DOTENVS" ]
|
|
then
|
|
for f in "$DOTENVS/*.active"
|
|
do
|
|
if [ "$f" = "$DOTENVS/*.active" ]
|
|
then
|
|
break
|
|
fi
|
|
|
|
source "$f"
|
|
done
|
|
fi
|
|
|
|
# Source Bashrc if BASH
|
|
if [ "$BASH" ] && [ -f $DOTFILES/bash/bashrc ]
|
|
then
|
|
source $DOTFILES/bash/bashrc
|
|
fi
|