From d818de1843c3775bfd9280d30ceaa24c5010cf69 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauldmccarthy@gmail.com> Date: Tue, 22 Jun 2021 09:49:35 +0100 Subject: [PATCH] RF: createWrapper was using chmod in a way that was incompatible with macOS --- share/fsl/sbin/createFSLWrapper | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/fsl/sbin/createFSLWrapper b/share/fsl/sbin/createFSLWrapper index a2eb101..737a220 100755 --- a/share/fsl/sbin/createFSLWrapper +++ b/share/fsl/sbin/createFSLWrapper @@ -109,5 +109,10 @@ for script in $targets; do fi # Preserve file permissions - chmod --reference="$sourceScript" "$targetScript" + if [[ "$OSTYPE" == "darwin"* ]]: then + perms=$(stat -f "%A" "$sourceScript") + chmod ${perms} "$targetScript" + else + chmod --reference="$sourceScript" "$targetScript" + fi done -- GitLab