diff options
author | 2023-06-16 12:32:51 +0200 | |
---|---|---|
committer | 2023-06-16 23:39:59 +0200 | |
commit | 1931c98f78d988cdfe03c247443de010de45f30b (patch) | |
tree | 2d6bcf55ab4064c807d5b88a2eef5237c7c6ad7c /eclass | |
parent | common-lisp-3.eclass: Don't inherit eutils (diff) | |
download | gentoo-1931c98f78d988cdfe03c247443de010de45f30b.tar.gz gentoo-1931c98f78d988cdfe03c247443de010de45f30b.tar.bz2 gentoo-1931c98f78d988cdfe03c247443de010de45f30b.zip |
common-lisp-3.eclass: Don't call readarray -d unless >=bash-5.0
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/common-lisp-3.eclass | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass index cd654f37b904..b2dbff3513de 100644 --- a/eclass/common-lisp-3.eclass +++ b/eclass/common-lisp-3.eclass @@ -126,8 +126,16 @@ common-lisp-install-sources() { common-lisp-install-one-source ${fpredicate} "${path}" "$(dirname "${path}")" elif [[ -d ${path} ]] ; then local files - readarray -d '' files < <(find "${path}" -type f -print0 || die "cannot traverse ${path}" ) - common-lisp-install-sources -t ${ftype} "${files[@]}" || die + # test can be dropped in EAPI 8 which guarantees bash-5.0 + if [[ ${BASH_VERSINFO[0]} -ge 5 ]]; then + readarray -d '' files < <(find "${path}" -type f -print0 \ + || die "cannot traverse ${path}") + else + # readarray has no -d option in bash-4.2 + readarray -t files < <(find "${path}" -type f -print \ + || die "cannot traverse ${path}") + fi + common-lisp-install-sources -t ${ftype} "${files[@]}" else die "${path} is neither a regular file nor a directory" fi |