Use DIR variable to store dotfile directory
Remove hardcoded command from .bashrc
This commit is contained in:
parent
5194b47776
commit
50f0cb085d
6
.bashrc
6
.bashrc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user