From: W. Trevor King Date: Wed, 30 Nov 2011 14:02:25 +0000 (-0500) Subject: Adjust .bashrc and .bashrc.d/dotfiles with the new dotfiles-framework locations. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c5735f94210bd1dd90ff86d9466fa46ae63d3033;p=dotfiles-public.git 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. --- 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"