From ed33e340f2c19777408466b036851e198aa11fce Mon Sep 17 00:00:00 2001 From: Will Angenent Date: Tue, 4 Apr 2023 20:21:05 +0100 Subject: [PATCH 1/2] 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 7b2d34ae..f518e5ba 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 0491d652..9de067fd 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" From a604a0663f612636e2903a77bf85d78d522da441 Mon Sep 17 00:00:00 2001 From: Will Angenent Date: Tue, 4 Apr 2023 20:29:04 +0100 Subject: [PATCH 2/2] Use more portable -c and -r options to touch --- repo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo.sh b/repo.sh index f85b4da9..1ca42d99 100755 --- a/repo.sh +++ b/repo.sh @@ -48,7 +48,7 @@ do fi # Match pkgar and tar time - touch --no-create --reference="${COOKBOOK_STAGE}.tar.gz" "${COOKBOOK_STAGE}.pkgar" + touch -c -r "${COOKBOOK_STAGE}.tar.gz" "${COOKBOOK_STAGE}.pkgar" continue fi