1
0
Fork 0
mirror of https://github.com/kastdeur/dotfiles.git synced 2024-11-01 01:53:32 +01:00
dotfiles/profiles/main.sh

42 lines
606 B
Bash
Raw Normal View History

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
if [ -d "~/.local/bin" ]
then
addpath "~/.local/bin"
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
2016-10-11 23:18:39 +02:00
if [ "$BASH" ] && [ -f $DOTFILES/bash/rc ]
then
2016-10-11 23:18:39 +02:00
source $DOTFILES/bash/rc
fi