From 9ff9741fe13708880f9130cf81d06578605b6c22 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 1 Dec 2011 09:12:34 -0500 Subject: [PATCH] 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. --- dotfiles.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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() { -- 2.26.2