public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] eclass/common-lisp-3: Properly escape recursive install files
@ 2022-04-07 20:58 Ulrich Müller
  0 siblings, 0 replies; only message in thread
From: Ulrich Müller @ 2022-04-07 20:58 UTC (permalink / raw
  To: gentoo-dev; +Cc: Marco Sirabella, Ulrich Müller

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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-07 20:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-07 20:58 [gentoo-dev] [PATCH] eclass/common-lisp-3: Properly escape recursive install files Ulrich Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox