From 7d18cccae949bb3ba088edb195ba9232ee204369 Mon Sep 17 00:00:00 2001 From: Jon Schewe Date: Sun, 9 Oct 2011 20:44:29 -0500 Subject: [PATCH] Remove error message when enabled directory is empty This is fixed by checking if the file exists before trying to source it. --- bash_it.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bash_it.sh b/bash_it.sh index fd7b546..bfa6664 100644 --- a/bash_it.sh +++ b/bash_it.sh @@ -14,7 +14,9 @@ source "${BASH}/themes/base.theme.bash" LIB="${BASH}/lib/*.bash" for config_file in $LIB do - source $config_file + if [ -e "${config_file}" ]; then + source $config_file + fi done # Load enabled aliases, completion, plugins @@ -27,7 +29,9 @@ do FILES="${BASH}/${file_type}/enabled/*.bash" for config_file in $FILES do - source $config_file + if [ -e "${config_file}" ]; then + source $config_file + fi done done @@ -41,7 +45,9 @@ fi CUSTOM="${BASH}/custom/*.bash" for config_file in $CUSTOM do - source $config_file + if [ -e "${config_file}" ]; then + source $config_file + fi done -- 2.17.1