37 lines
687 B
Text
37 lines
687 B
Text
# If not running interactively, don't do anything
|
|
|
|
[ -z "$PS1" ] && return
|
|
|
|
#Get dotfiles directory
|
|
|
|
if [ -d "$HOME/.dotfiles" ]; then
|
|
DOTFILES_DIR="$HOME/.dotfiles"
|
|
else
|
|
echo "Unable to find dotfiles, exiting."
|
|
return
|
|
fi
|
|
|
|
# Make utilities available
|
|
|
|
PATH="$DOTFILES_DIR/bin:$PATH"
|
|
|
|
for DOTFILE in "$DOTFILES_DIR"/system/{path,env,prompt,alias,function,conda,custom}.sh; do
|
|
[ -f "$DOTFILE" ] && . "$DOTFILE"
|
|
done
|
|
|
|
unset DOTFILE
|
|
|
|
DOTFILES_EXTRA_DIR="$HOME/.extra"
|
|
|
|
if [ -d "$DOTFILES_EXTRA_DIR" ]; then
|
|
for EXTRAFILE in "$DOTFILES_EXTRA_DIR"/runcom/*.sh; do
|
|
[ -f "$EXTRAFILE" ] && . "$EXTRAFILE"
|
|
done
|
|
fi
|
|
|
|
unset EXTRAFILE
|
|
|
|
# Export
|
|
|
|
export DOTFILES_DIR DOTFILES_EXTRA_DIR
|
|
|