From: W. Trevor King Date: Thu, 1 Dec 2011 14:12:34 +0000 (-0500) Subject: Only initialize REPO_SOURCE_DATA if Bash supports associative arrays. X-Git-Tag: v0.3~27 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9ff9741fe13708880f9130cf81d06578605b6c22;p=dotfiles-framework.git Only initialize REPO_SOURCE_DATA if Bash supports associative arrays. We already bail out if the user tries to clone using wget. This commit just avoids pestering the user with the 'declare' error message. --- diff --git a/dotfiles.sh b/dotfiles.sh index 6571f98..acaf3c3 100755 --- a/dotfiles.sh +++ b/dotfiles.sh @@ -114,7 +114,10 @@ function list_files() } # Global variable to allow passing associative arrats between functions -declare -A REPO_SOURCE_DATA + +if [ "${BASH_MAJOR}" -ge 4 ]; then + declare -A REPO_SOURCE_DATA +fi function set_repo_source() {