From 14062a6b6748241e84bae7fe2342ba5c81cc4e6b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 18 Aug 2016 11:20:17 +1200 Subject: Use consistent syntax for sh source loops --- bash/bash_profile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'bash/bash_profile') diff --git a/bash/bash_profile b/bash/bash_profile index 9d2fd76c..db1d9bc8 100644 --- a/bash/bash_profile +++ b/bash/bash_profile @@ -14,13 +14,10 @@ elif ((BASH_VERSINFO[0] == 2)) && fi # Load any supplementary scripts -if [[ -d $HOME/.bash_profile.d ]] ; then - for bash_profile in "$HOME"/.bash_profile.d/*.bash ; do - [[ -e $bash_profile ]] || continue - source "$bash_profile" - done - unset -v bash_profile -fi +for sh in "$HOME"/.bash_profile.d/*.bash ; do + [[ -e $sh ]] && source "$sh" +done +unset -v sh # If ~/.bashrc exists, source that too; the test for interactivity is in there if [[ -f $HOME/.bashrc ]] ; then -- cgit v1.2.3