From b8a86f98cecfcdb9b3013d5f2cf6e32bee7f2133 Mon Sep 17 00:00:00 2001 From: Alexander Hosking Date: Wed, 29 Mar 2017 16:50:27 -0400 Subject: [PATCH] Fix the dotfiles directory sourcing --- run/.bashrc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/run/.bashrc b/run/.bashrc index faaaf96..ba7e27f 100644 --- a/run/.bashrc +++ b/run/.bashrc @@ -8,11 +8,12 @@ esac READLINK=$(which greadlink || which readlink) CURRENT_SCRIPT=$BASH_SOURCE -if [[ -n $CURRENT_SCRIPT && -x "$READLINK" ]]; then +if [ -d "$HOME/.dotfiles" ]; then + DOTFILES_DIR="$HOME/.dotfiles" +elif [[ -n $CURRENT_SCRIPT && -x "$READLINK" ]]; then SCRIPT_PATH=$($READLINK -f "$CURRENT_SCRIPT") DOTFILES_DIR=$(dirname "$(dirname "$SCRIPT_PATH")") -elif [ -d "$HOME/.dotfiles" ]; then - DOTFILES_DIR="$HOME/.dotfiles" + echo $DOTFILES_DIR else echo "Unable to find dotfiles, exiting." return # `exit 1` would quit the shell itself @@ -25,8 +26,7 @@ for DOTFILE in "$DOTFILES_DIR"/system/.{function,env,alias,prompt}; do done # Set LSCOLORS - -eval "$(dircolors "$DOTFILES_DIR"/system/.dir_colors)" +eval "$(dircolors $DOTFILES_DIR/system/.dir_colors)" # Hook for extra/custom stuff