Use gfind in MacOS for use with -executable option

This commit is contained in:
Will Angenent 2023-04-04 20:21:05 +01:00
parent a2cfd448b0
commit ed33e340f2
2 changed files with 5 additions and 2 deletions

View File

@ -51,3 +51,6 @@ else
FIND="find"
STAT="stat";
fi
export FIND
export STAT

View File

@ -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"