Use DIR variable to store dotfile directory

Remove hardcoded command from .bashrc
This commit is contained in:
Gwen Lofman 2017-07-05 21:13:35 -04:00
parent 5194b47776
commit 50f0cb085d

View File

@ -8,12 +8,16 @@ case $- in
*) return;;
esac
DIR="$(dirname $(readlink -f ~/.bashrc))"
# load all dotfiles in dotfiles repository
for DOTFILE in `find $(dirname $(readlink -f ~/.bashrc))/system/.{prompt,functions,alias,path,env}.sh`
for DOTFILE in `find $DIR/system/.{prompt,functions,alias,path,env}.sh`
do
[ -f "$DOTFILE" ] && source "$DOTFILE"
done
unset DIR
# Source global definitions
if [ -f /etc/bashrc ]; then
source /etc/bashrc