From c5735f94210bd1dd90ff86d9466fa46ae63d3033 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 30 Nov 2011 09:02:25 -0500 Subject: [PATCH] Adjust .bashrc and .bashrc.d/dotfiles with the new dotfiles-framework locations. Also add ~/ to .bashrc.d sourcings in .bashrc, so you can source ~/.bashrc without being in your home directory. --- src/.bashrc | 16 ++++++++-------- src/.bashrc.d/dotfiles | 6 +++--- src/.bashrc.d/environment | 3 --- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/.bashrc b/src/.bashrc index 6b99654..3bbae56 100644 --- a/src/.bashrc +++ b/src/.bashrc @@ -24,17 +24,17 @@ export HISTCONTROL=ignoreboth # update the values of LINES and COLUMNS. shopt -s checkwinsize -source .bashrc.d/environment -#source .bashrc.d/screen -#source .bashrc.d/completion -#source .bashrc.d/nobeep -#source .bashrc.d/lesspipe -source .bashrc.d/ssh_agent -source .bashrc.d/gpg_agent +source ~/.bashrc.d/environment +#source ~/.bashrc.d/screen +#source ~/.bashrc.d/completion +#source ~/.bashrc.d/nobeep +#source ~/.bashrc.d/lesspipe +source ~/.bashrc.d/ssh_agent +source ~/.bashrc.d/gpg_agent # load aliases if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi -source "${DOTFILES_DIR}/src/.bashrc.d/dotfiles" +source ~/src/dotfiles/public/src/.bashrc.d/dotfiles diff --git a/src/.bashrc.d/dotfiles b/src/.bashrc.d/dotfiles index 1a5e5b2..c4fcf06 100644 --- a/src/.bashrc.d/dotfiles +++ b/src/.bashrc.d/dotfiles @@ -1,6 +1,6 @@ # Run the dotfiles.sh script if it exists -DS="${DOTFILES_DIR}/bin/dotfiles.sh" -if [ -f "${DS}" ] && [ -x "${DS}" ]; then - "${DS}"; +DS="$(which dotfiles.sh)" +if [ -n "${DS}" ] && [ -f "${DS}" ] && [ -x "${DS}" ]; then + "${DS}" --dotfiles-dir ~/src/dotfiles update fi diff --git a/src/.bashrc.d/environment b/src/.bashrc.d/environment index 5550652..29a03db 100644 --- a/src/.bashrc.d/environment +++ b/src/.bashrc.d/environment @@ -1,6 +1,3 @@ -# path to local dotfiles checkout -export DOTFILES_DIR=~/"src/dotfiles" - # define default programs export EDITOR="/usr/bin/emacs -nw" export PAGER="less" -- 2.26.2