From ed33e340f2c19777408466b036851e198aa11fce Mon Sep 17 00:00:00 2001
From: Will Angenent <will.angenent@gmail.com>
Date: Tue, 4 Apr 2023 20:21:05 +0100
Subject: [PATCH] Use gfind in MacOS for use with -executable option

---
 config.sh                   | 3 +++
 recipes/drivers/recipe.toml | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/config.sh b/config.sh
index 7b2d34aee..f518e5bac 100755
--- a/config.sh
+++ b/config.sh
@@ -51,3 +51,6 @@ else
     FIND="find"
     STAT="stat";
 fi
+
+export FIND
+export STAT
diff --git a/recipes/drivers/recipe.toml b/recipes/drivers/recipe.toml
index 0491d6523..9de067fd4 100644
--- a/recipes/drivers/recipe.toml
+++ b/recipes/drivers/recipe.toml
@@ -9,7 +9,7 @@ script = """
     --workspace
 
 mkdir -pv "${COOKBOOK_STAGE}/bin"
-find "target/${TARGET}/release" \
+${FIND} "target/${TARGET}/release" \
     -maxdepth 1 \
     -executable \
     -type f \
@@ -19,7 +19,7 @@ mkdir -pv "${COOKBOOK_STAGE}/etc/pcid"
 cp -v "${COOKBOOK_SOURCE}/initfs.toml" "${COOKBOOK_STAGE}/etc/pcid/initfs.toml"
 
 mkdir -pv "${COOKBOOK_STAGE}/etc/pcid.d"
-find "${COOKBOOK_SOURCE}" -maxdepth 2 -type f -name 'config.toml' | while read conf
+${FIND} "${COOKBOOK_SOURCE}" -maxdepth 2 -type f -name 'config.toml' | while read conf
 do
     driver="$(basename "$(dirname "$conf")")"
     cp -v "$conf" "${COOKBOOK_STAGE}/etc/pcid.d/$driver.toml"
-- 
GitLab