>>>>> On Wed, 21 Aug 2013, Michał Górny wrote: > elif [[ $(declare -p DOCS) == "declare -a "* ]] ; then
Thinking about it again, the pattern matching (already present in default_src_install of EAPI 4) is brittle and relies on the output of declare -p whose exact format is undocumented. Maybe we could change the test for an array to the following? elif ! declare +a DOCS &>/dev/null; then This seems to work fine in bash versions 3.2 and 4.2. And behaviour is well documented in the bash reference manual [1]: | Using `+' instead of `-' turns off the attribute instead, with the | exceptions that `+a' may not be used to destroy an array variable | [...] | | The return status is zero unless [...] an attempt is made to turn | off array status for an array variable, [...] Ulrich [1] http://www.gnu.org/software/bash/manual/bashref.html#Bash-Builtins