Skip to content

Commit

Permalink
checks if files exist before sourcing
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilalh authored and samina hussain committed Jun 23, 2011
1 parent b2de4ae commit abc7f24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ shopt -s histreedit # allows re-edit on C-R
export EDITOR='vim' # default editor
export FIGNORE=$FIGNORE:.pyc:.o:.class

source ~/.completion/git-completion.bash # git auto complete
source ~/.bash/bashmarks.bash
[ -f ~/.completion/git-completion.bash ] && source ~/.completion/git-completion.bash
[ -f ~/.bash/bashmarks.bash ] && source ~/.bash/bashmarks.bash

# Path settings(bin before current $PATH to override default version)
export PATH=$HOME/bin:/usr/local/bin:$PATH
Expand Down
9 changes: 3 additions & 6 deletions .bashrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#Adds all files in .bash at lanuch
for i in ~/.bash/*.sh; do
source $i
done
[ -d ~/.bash/ ] && for i in ~/.bash/*.sh; do source $i; done

[ -d ~/.pbash/ ] && for i in ~/.pbash/*.sh; do source $i; done

for i in ~/.pbash/*.sh; do
source $i
done

0 comments on commit abc7f24

Please sign in to comment.