• [gentoo-dev] [PATCH] eclass/common-lisp-3: Properly escape recursive in

    From =?UTF-8?q?Ulrich=20M=C3=BCller?=@21:1/5 to All on Thu Apr 7 23:00:01 2022
    From: Marco Sirabella <marco@sirabella.org>

    This is a bit of a roundabout way to do it, but since we want to pass
    the results of `find` to a bash function, this is what we need to do.

    All of these functions are a bit convoluted, I believe something similar
    could be hacked together that looks like `find -type f -name '*.lisp'
    -exec doins` (or xargs) without the recursive calling or escaping mess

    Signed-off-by: Marco Sirabella <marco@sirabella.org>
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>
    ---
    eclass/common-lisp-3.eclass | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
    index 5314e391db8f..df624d51607c 100644
    --- a/eclass/common-lisp-3.eclass
    +++ b/eclass/common-lisp-3.eclass
    @@ -127,7 +127,9 @@ common-lisp-install-sources() {
    if [[ -f ${path} ]] ; then
    common-lisp-install-one-source ${fpredicate} "${path}" "$(dirname "${path}")"
    elif [[ -d ${path} ]] ; then
    - common-lisp-install-sources -t ${ftype} $(find "${path}" -type f)
    + local files
    + readarray -d '' files < <(find "${path}" -type f -print0 || die "cannot traverse ${path}" )
    + common-lisp-install-sources -t ${ftype} "${files[@]}" || die
    else
    die "${path} is neither a regular file nor a directory"
    fi
    --
    2.35.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)