diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-02 02:06:33 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-02 02:06:33 +1200 |
commit | 46ad312d3e20e2c4dbf3b06c7ac962177a02fd8d (patch) | |
tree | 963da4b6c8862035daa9d5f35267c81bad6987f7 | |
parent | Clearer syntax for prompt (diff) | |
download | dotfiles-46ad312d3e20e2c4dbf3b06c7ac962177a02fd8d.tar.gz dotfiles-46ad312d3e20e2c4dbf3b06c7ac962177a02fd8d.zip |
Handle empty .bashrc.d/.profile.d dirs
-rw-r--r-- | bash/bashrc | 2 | ||||
-rw-r--r-- | sh/profile | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc b/bash/bashrc index f9b0e38d..1fc1df2d 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -67,7 +67,7 @@ shopt -s progcomp 2>/dev/null # Load any supplementary scripts if [[ -d $HOME/.bashrc.d ]]; then for config in "$HOME"/.bashrc.d/*; do - source "$config" + [[ -f $config ]] && source "$config" done fi unset config @@ -16,7 +16,7 @@ export PATH # Load all supplementary scripts in ~/.profile.d if [ -d "$HOME"/.profile.d ]; then for config in "$HOME"/.profile.d/*; do - . "$config" + [ -f "$config" ] && . "$config" done fi unset config |